A gantry crane records n load measurements taken in order. A safety monitor slides a window of exactly k consecutive measurements across the sequence and, for each window position, must know the peak (maximum) load in that window.
Output the maximum of every contiguous window of size k, from the leftmost window to the rightmost.
Input format
Line 1: two integers n and k.
Line 2: n space-separated integers, the load measurements.
Output format
One line with n - k + 1 space-separated integers: the maximum of each window, left to right.
Constraints
- 1 <= k <= n <= 100000
- -1000000000 <= each load <= 1000000000