import java.util.*;
public class TestProf
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    System.out.println("Enter two profs: ex. Joe Blough jblough assoc Computer Science");
    Prof m1 = Prof.read(sc);
    Prof m2 = Prof.read(sc);
    if (m1.before(m2))
      System.out.println(m1 + "\n" + m2);
    else
      System.out.println(m2 + "\n" + m1);
  }
}