Problem8238--ABC278 —— A - Shift

8238: ABC278 —— A - Shift

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

You are given a sequence $A=(A_1,A_2,…,A_N)$ of length N.
You perform the following operation exactly K times:
  • remove the initial element of A and append a 0 to the tail of A.
Print all the elements of A after the operations.

Input

The input is given from Standard Input in the following format:
$N$ $K$
$A_1\ A_2\ …\ A_N$

Output

Print the elements of A after the operations in one line, separated by spaces.

Constraints

$1≤N≤100$
$1≤K≤100$
$1≤A_i≤100$
All values in the input are integers.

Sample 1 Input

3 2
2 7 8

Sample 1 Output

8 0 0
Before the operations, A=(2,7,8).
After performing the operation once, A=(7,8,0).
After performing the operation twice, A=(8,0,0).
Thus, (8,0,0) is the answer.

Sample 2 Input

3 4
9 9 9

Sample 2 Output

0 0 0

Sample 3 Input

9 5
1 2 3 4 5 6 7 8 9

Sample 3 Output

6 7 8 9 0 0 0 0 0

Source/Category