Sort the keys.