Rotation Matching

Problem Name:
Rotation Matching
Site:CodeForces
Links:
Tags:
Problem setters: