abstract class Unit {
	public abstract String getVoice();
}

class UnitFatory {
	public static Unit getUnit(String unitName) {
		if ("marine".equalsIgnoreCase(unitName)) return new Marine();
		else if ("zealot".equalsIgnoreCase(unitName)) return new Zealot();
		else return new Zergling();
	}
}

class Marine extends Unit {
	public Marine() {}
	public String getVoice() { return "You wanna piece of me, boy?" }
}
class Zealot extends Unit {
	public Zealot() {}
	public String getVoice() { return "My life for Aiur!" }
}
class Zergling extends Unit {
	public Zergling() {}
	public String getVoice() { return "!@#$$%^&*&^#$%*" }
}

public class TestCode {
	public static void main(String[] args) {
		Unit unit1 = UnitFatory.getUnit("Marine");
		Unit unit2 = UnitFatory.getUnit("zzealot");
		System.out.println(unit1.getVoice()); // You wanna piece of me, boy?
		System.out.println(unit2.getVoice()); // !@#$$%^&*&^#$%*
	}
}