Sergey's submission of Nested Rotation | CodeChef