codeforces 935D. Fafa and Ancient Alphabet (math)

NoSuchKey