import java.io.*;

public class D implements Externalizable{
public String a;
//public byte[] a;
public byte typ;
public short col;
public short idx;

  public D(int t,int c,String a,int i){
      this.typ = (byte)t;
      this.a = a;
      this.idx = (short)i;
      this.col = (short)c;
  }

  public void writeExternal(ObjectOutput stream) throws java.io.IOException {
     stream.writeShort(col);
     stream.writeShort(idx);
     stream.writeUTF(a); 
     stream.writeByte(typ); 
  }

  public void readExternal(ObjectInput stream) throws java.io.IOException {
     col = stream.readShort();
     idx = stream.readShort();
     a   = stream.readUTF();
     typ = stream.readByte();
  }
}

