class President:
  name = None
  id = None
  gpa = None
# President specification ends here

def outputPresidents(president, nPresidents):
  for i in range(nPresidents):
    print("Name =", "{:30}".format(president[i].name), end="") 
    print(" ID =", "{:07}".format(president[i].id), end="") 
    print(", gpa =", president[i].gpa)
# outputPresidents ends here

# main program starts here
try: # open a file for input
  fin = open("presidents.txt")

  # create an empty list
  MAX_PRESIDENTS = 30 # list capacity 
  nPresidents = 0 # initially empty list
  president = [President() for i in range(MAX_PRESIDENTS)]
except:
  print("file not found")
  exit() # end the program NOW

# read and save the records
for lineFromFile in fin:
  aPresident = President()  
  aPresident.name = lineFromFile.strip()
  aPresident.id = int(fin.readline().strip())
  aPresident.gpa = float(fin.readline().strip())
  fin.readline() # skip the ---------- separator

  # add record to list, if it's not full
  if (nPresidents < MAX_PRESIDENTS):
    president[nPresidents] = aPresident
    nPresidents += 1 
fin.close() # done with the file

# sort the presidents by name
for i in range(nPresidents):
  for j in range(i + 1, nPresidents):
     if president[i].name.lower() > president[j].name.lower():
       president[i],president[j] = president[j],president[i]        

outputPresidents(president, nPresidents)