LogiQuest

55. Left Rotation

EasyArray

Rotate the array to the left by k positions and print it.

Input format

Line 1: n k Line 2: n integers

Output format

The rotated array.

Example 1

Input

5 2
1 2 3 4 5

Output

3 4 5 1 2

Example 2

Input

3 3
7 8 9

Output

7 8 9

Constraints

1 ≤ n ≤ 10⁵ 0 ≤ k ≤ 10⁹

Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.

Loading the MyLoginn IDE…