Codeforces Round #603 C. Everyone is a Winner!

NoSuchKey