Problem 2A
Rotating Words

Description

You are required to rotate a word a certain amount. For example, to rotate the word "Computer" by 1 results in "rCompute". Rotating it two more times gives you "terCompu".

Input

The first line contains the word (which will not have more than 15 letters). The second line contains an integer n, which will be less than the length of the word. You must rotate the word n times.

Output

The output will be the rotated word.

Example 1

Input

Computer
3

Output

terCompu

Example 2

Input

Program
1

Output

mProgra