Question
Array Left 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 left KaTeX can only parse string typed expression times.

A single left shift moves the first element of the array to the end, and shifts all other elements one position to the left.

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 left shifts.
Example
Input
5 2
1 2 3 4 5

Output
3 4 5 1 2

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

Online