import java.io.*;
import java.text.*;
 
class Student
{
  String name;
  int id;
  float gpa;
  Student next; // the link
} // Student

public class StudentLinkedList
{
  public static void main(String[] argv) throws Exception
  {
    BufferedReader fin;
    fin = new BufferedReader(new FileReader("students.txt"));
 
    // create an empty linked list
    Student start = null;
 
    // read and save the records
    while (fin.ready())
    {
      // create a node and read its data fields
      Student aStudent = new Student();
      aStudent.name = fin.readLine();
      aStudent.id = new Double(fin.readLine()).intValue();
      aStudent.gpa = new Double(fin.readLine()).floatValue();

      fin.readLine(); // skip the separator line

      // add node to front of list
      aStudent.next = start;
      start = aStudent;
    } // while
    fin.close();

    // traverse the list and print
    String blank = "                              ";
    Student p;
    for (p = start ; p != null; p = p.next)
    {
      System.out.print("Name = " + p.name);
      System.out.print(blank.substring(p.name.length()));
      System.out.print(" ID = "
        + new DecimalFormat("0000000").format(p.id));
      System.out.println(" gpa = " + p.gpa);
    } // for
    System.out.println();
  } // main
} // public class
