LearnPy Hub
← Arena
EasyRating 900

Rotate Right

Rotate the array right by k steps and print it.

Input

n k, then n integers.

Output

One line.

Sample 1

Input
7 3
1 2 3 4 5 6 7
Output
5 6 7 1 2 3 4

Sample 2

Input
2 5
1 2
Output
2 1
solution.py
Output appears here
Rotate Right · Python Arena problem · LearnPy Hub