Rank Class and write to file.