Problem Description

Read n integers and k. Rotate list to the right by k positions and output.

Input Format

Line1 n k. Line2 n integers.

Output Format

Rotated list.

Sample Test Case

Input:
5 2 1 2 3 4 5
Output:
4 5 1 2 3

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next