Simulate a queue#11786

Simulate a queue

1 second
64 megabytes
Easy

Given a sequence A = (a_1, a_2, \ldots, a_n) of integers of length .

Perform the following operation exactly times:

After applying these operations, print all elements of .

Input

The first line contains two integers (n \le 10^5) and (k \le 10^5).

The second line contains integers representing the initial sequence .

Output

Print all elements of after performing the operations.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading