Hongcow Learns the Cyclic Shift

Problem Name:
Hongcow Learns the Cyclic Shift
Site:CodeForces
Links:
Tags:
Problem setters: