Hash to sorted array of arrays