Codeforces Round #506 (Div. 3) A Many Equal Substrings

NoSuchKey