You're given a string $$$s$$$ of length $$$n$$$ with lowercase English letters, Shift of $$$s$$$ means to remove the first $$$k$$$ letters and transfer them the the end of the string which $$$(1 \le k \le n)$$$.
In the other words :
At first $$$s = $$$ $$$s_{1}s_{2},...s_{k},...s_{n}$$$ after the operation $$$s = $$$ $$$s_{k+1},s_{k+2},...,s_{n},s_{1},s_{2},...s_{k}$$$.
Now you're given $$$s$$$ and $$$n$$$, Your task is to find the lexicographically minimum string among all $$$n$$$ shifts of $$$s$$$.
In the first line of input you'll be given an integer $$$n$$$ which $$$n$$$ is length of the string ($$$1 \le n \le 3 * 10^5$$$).
The second line of testcase consists the string $$$s$$$.
Print the lexicographically minimum string among all shifts of $$$n$$$.
4 nima
anim
All the shifts of "nima" are : "iman", "mani", "anim", "nima", which "anim" is the lexicographically minimum among all of them.
| Name |
|---|


