class Character
{
	String value;
	Character()
	{
		value = "null";
	}
	Character(String value)
	{
		this.value = value;
	}
	public void Output()
	{
		System.out.println("Jestem znakiem " + value);
	}
}
class Letter extends Character
{
	Letter(String value)
	{
		super(value);
	}
	public void Output()
	{
		System.out.print("Jestem liter¹ i ");
		super.Output();
	}
	public void Output(String prefix)
	{
		System.out.print(prefix + ": ");
		Output();
	}
}
class Number extends Character
{
	float value;
	Number(String value)
	{
		super(value);
	}
	public void Output()
	{
		System.out.print("Jestem liczb¹ i ");
		super.Output();
	}
	public void Output(String prefix)
	{
		System.out.print(prefix + ": ");
		Output();
	}
}

class CharacterOutput 
{
	public static void main(String[] args)
	{
		Character c [] = new Character [] { new Letter("A"),
											new Letter("B"),
											new Letter("C"),
											new Number("1"),
											new Number("2"),
											new Number("3") };
		// Wyliczenie tablicy argumentów wiersza poleceń
		for(int i = 0; i < c.length; ++i)
			c[i].Output();
		Number n = new Number("4");
		n.Output("test");
	}
}

