C. Finite or not? Codeforces Round #483 (Div. 2)

NoSuchKey