A sensor produces n integer frame readings in order. Using a window of exactly k consecutive frames that slides one frame at a time from the start to the end, output the maximum reading inside each window position.
Input format
Line 1: two integers n and k.
Line 2: n space-separated integers, the frame readings.
Output format
One line with n - k + 1 space-separated integers: the maximum of each length-k window, left to right.
Constraints
- 1 ≤ k ≤ n ≤ 100000
- -1000000000 ≤ each reading ≤ 1000000000