A window of size k slides from the left to the right of the array one position at a time. Report the maximum of each window.
Input: line 1 — space-separated integers; line 2 — k (1 ≤ k ≤ length). Output: the maximum of every window, space-separated.
Your program reads from stdin and prints to stdout.
Example 1
Input: 1 3 -1 -3 5 3 6 7 3
Output: 3 3 5 5 6 7
Hints