A Twisty Movement

Problem Name:
A Twisty Movement
Site:CodeForces
Links:
Tags:
Problem setters: