working solution for all data sets for File Fix-It, a Google Code Jam practice problem.