import tools.*;

class Invierte extends Program {
  void run() {
    Array tab= new Array(1000);
    TextReader lect= new TextReader("datos.txt");
    int i= 0;
    while (true) {
      String lin= lect.readLine();
      if (lect.eofReached())
        break;
      tab.put(i, lin);
      i= i+1;
    }
    lect.close();
    // i es el número de líneas del archivo
    i= i-1;
    while (i>=0) {
      println(tab.getString(i));
      i= i-1;
    }
  }
}
