In the editorial of the problem Pasha and String, the author makes a claim that, "it doesn't matter in which order make reverses, answer will be the same for all orders." What is the reasoning behind this statement? Is it because the rotation of string is always symmetric about the center(from the position i to s  i + 1)? asked 20 Mar '18, 18:13

Yes, that is correct. A rotation causes changes in positions of characters, but a character at $i$ is always swapped with that at $si+1$. So the only thing which is important with regard to a pair of positions $(i, si+1)$ is the number of rotations that affect them. answered 20 Mar '18, 19:07
