Items ride a conveyor as a single string of lowercase letters. A relabeling machine processes the string in blocks of 2k characters from left to right. Within each block it reverses the first k characters and leaves the next k characters as they are. For the final partial block, the standard rule applies:
- If fewer than
kcharacters remain, reverse all of them. - If between
kand2kcharacters remain, reverse the firstkand leave the rest as they are.
Print the resulting string.
Input format
Line 1: an integer k.
Line 2: a non-empty string of lowercase English letters.
Output format
A single line: the transformed string.
Constraints
- 1 <= k <= 100000
- 1 <= length of the string <= 100000
- The string consists only of lowercase English letters (
a-z).