import java.awt.*;
import java.awt.event.*;
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;

class FrameName {
	String name;
	int animBeginFrame;
	int animEndFrame;
}

class JMd2Aux {
	
	int numAnims;
	FrameName anims[];
	
	JMd2Aux() { }
	JMd2Aux(String fileName) {
		read(fileName);
	}
	
	public void read(String fileName) {

		try {

			RandomAccessFile rf = new RandomAccessFile(fileName,"r");
			
			numAnims = rf.readInt();
			
			anims = new FrameName[numAnims];
						
			for(int i=0;i<numAnims;i++) {
				
				anims[i] = new FrameName();
				int frameNameLeng = rf.readInt();
				
				byte byteName[] = new byte[frameNameLeng];
			
				for(int j=0;j<frameNameLeng;j++) {
					byteName[j] = rf.readByte();
				}
				for(int j = frameNameLeng;j<16;j++) {
					byte byteRead = rf.readByte();
				}
				
				anims[i].name = new String(byteName);
				anims[i].animBeginFrame = rf.readInt();
				anims[i].animEndFrame = rf.readInt();
				
				// debug msgs
				/*
				System.out.println(anims[i].name + " " + anims[i].animBeginFrame 
				+ " " + anims[i].animEndFrame);*/
			}
		}
		catch( Exception e ) {
			System.err.println("Exception : " + e);
		}
	}
}

/*public class AuxTest {
	public static void main(String args[]) {
		JMd2Aux auxFile = new JMd2Aux();
		auxFile.read("tris.jaux");
	}
}*/