solution sorting by frequency and alphabetical order