Anagram coding puzzle