336. Array Rotation by Alice

0

Easy

Alice has an array of size N and wants to rotate it to the right by K steps. Help Alice accomplish this task.

Input Format

The first line of input consists of two positive integers N and K, separated by a space. The second line of input consists of N space-separated integers.

Output Format

Print the resulting array.

Example

Input

7 3 1 2 3 4 5 6 7

Output

5 6 7 1 2 3 4

Constraints

1 <= K, N <= 10^5 0 <= A[i] <= 10^5
Loading...

View Submissions

Console