import java.io.*;
import java.util.*;

public class ch10ex1 {
  public static void main(String args[]) {
    try {
      DataInputStream in =
        new DataInputStream(
          new BufferedInputStream(
            new FileInputStream("ch10ex1.java")));
      Vector v = new Vector();
      String s;
      while((s = in.readLine()) != null)
        v.addElement(s);
      for(int i = v.size() - 1; i >= 0; i--)
        System.out.println(
          (String)v.elementAt(i));
    } catch(FileNotFoundException e) {
      System.err.println("File not found");
    } catch(IOException e) {
      System.err.println("IO error");
    }
  }
}
