Sort dictionary.