Question
Array Right Rotation

You are given an array of KaTeX can only parse string typed expression integers. Your task is to print the array after shifting it to the right KaTeX can only parse string typed expression times.

A single right shift moves the last element of the array to the front, and shifts all other elements one position to the right.

Input
The first line contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression — the size of the array and the number of shifts.
The second line contains KaTeX can only parse string typed expression integers — KaTeX can only parse string typed expression — the elements of the array.
Output
Print KaTeX can only parse string typed expression integers — the array after performing KaTeX can only parse string typed expression right shifts.
Example
Input
5 2
1 2 3 4 5

Output
4 5 1 2 3

Explanation
After 1 shift: [5, 1, 2, 3, 4]
After 2 shifts: [4, 5, 1, 2, 3]

Online