Codeforces Round #616 (Div. 2) D. Irreducible Anagrams

NoSuchKey