Anagram congruences