Make grades dict ordered