Is your horseshoe on the other hoof?

Problem Name:
Is your horseshoe on the other hoof?
Site:CodeForces
Links:
Tags:
Problem setters: