Spy Detected!

Problem Name:
Spy Detected!
Site:CodeForces
Links:
Tags: