Codeforce 1296 C. Yet Another Walking Robot

NoSuchKey