AdvancedRating 1700
Smallest Rotation
A rotation moves some characters from the front to the back. Print the alphabetically smallest rotation of the string.
Input
One string (length ≤ 10⁵).
Output
One string.
Sample 1
Input
bca
Output
abc
Sample 2
Input
aaaa
Output
aaaa
Output appears here