reading, editing and creating a new file

My program should at the moment read from a file called input, create two new files called east and west. And then print Roster number x for each player. Right now I am working on how to break up each word in the input file into tokens. and print them off in this order.