I'm grateful for any help here!

My program is generally quite a simple problem; must read in a list containing names and numbers and print it out like a phonebook in alphabetical order, in order of surname, comma, forename, and a number in a 2nd column. An example of the input is:

Fred Flintstone 555437
John Wayne 645373
Michael Schumacher 0343653
etc.

And the output should be:...