MoveToFront and CircularSuffixArray works.