import java.io.*;
import java.util.*;
abstract class Vehicle {                                             //车辆抽象类

	int vehCode;                                                 //车辆编号
	String vehType;                                              //车辆型号
	String vehUse;                                               //车辆用途
	void setVehCode(int code) {
		vehCode = code;
	}
	void setVehType(String type) {
		vehType = type;
	}
	void setVehUse(String use) {
		vehUse = use;
	}
	public String vehicleMessage() {                                //返回车辆信息
		return (vehCode + " " + vehType + " " + vehUse);
	}
	public void run() {
		System.out.println("run by wheel");
	}
}
interface Arm {                                                  //武器接口
	public void shoot();
	public void loadAmmo();
}
class Jeep extends Vehicle {                                        //吉普车类
	int passenger;                                               //乘客数
	void setPassenger(int passer) {
		passenger = passer;
	}
	public void printMessage() {                                  //输出吉普车详细信息
		System.out.println(super.vehicleMessage() + " " + passenger);
	}
}
class Truck extends Vehicle {                                      //卡车类
	int loader;                                                 //载重量
	void setLoader(int load) {
		loader = load;
	}
	public void printMessage() {                                  //输出卡车详细信息
		System.out.println(super.vehicleMessage() + " " + loader);
	}
}
class Panzer extends Vehicle implements Arm {                       //装甲车类
	int shot;                                                  //射击位置数
	void setShot(int shot) {
		this.shot = shot;
	}
	public void run() {                                         //重写父类方法
		System.out.println("run by pedrail");
	}
	public void shoot() {                                       //实现接口方法
		System.out.println("shooting the target");
	}
	public void loadAmmo() {                                  //实现接口方法
		System.out.println("loading ammo ");
	}
	public void printMessage() {                                //输出装甲车详细信息
		System.out.println(super.vehicleMessage() + " " + shot);
	}
}
class UserInterface {                                           //用户接口类
	static boolean signal = true;
	static Vector eSet = new Vector();                            //机动设备集合
	public static void main(String[] args) {
		inputMessage();
		outputMessage();
	}
	static void inputMessage()                                  //输入车辆信息
	{
		String message;
		StringTokenizer st;
		st = new StringTokenizer("1 10001 运输 300", " ");       //分解字符串
		Truck truck = new Truck();
		if (st.hasMoreTokens())
			truck.setVehCode(Integer.valueOf(st.nextToken()).intValue());
		if (st.hasMoreTokens())
			truck.setVehType(st.nextToken());
		if (st.hasMoreTokens())
			truck.setVehUse(st.nextToken());
		if (st.hasMoreTokens())
			truck.setLoader(Integer.valueOf(st.nextToken()).intValue());
		eSet.addElement(truck);				
	}
	public static void outputMessage()                          //根据要求输出机动设备信息
	{
		boolean flag = true;                                 //输入信息标记
		StringTokenizer st;
		String str;
		for (int j = 0; j < eSet.size(); j++) {
			Vehicle vehicle = (Vehicle) eSet.elementAt(j);
			if (vehicle instanceof Truck)                      //是卡车
				((Truck) vehicle).printMessage();
		}
	} 
}