SP10582 ARRAYSUB - subarrays

Description

Given an array and an integer k, find the maximum for each and every contiguous subarray of size k.

Input Format

the number n denoting number of elements in the array then after a new line we have the numbers of the array and then k in a new line n < 10^6 k < 10^5 1

Output Format

print the output array