Problem Statement
Pondo has an array of integers of length
as well as an integer
.
He wishes to form the array
of length
by taking taking all the subarrays of length
and taking their minimums, i.e.
.
Input Format
Your first line will contain two space-separated integers and
.
Your next line will contain
integers representing
.
Output Format
You should output integers representing
.
Constraints
## Sample Cases
Input 1
10 5
10 9 8 7 6 5 4 3 2 1
Output 1
6 5 4 3 2 1
Input 2
10 4
684839257 302743967 551107459 232951579 483565957 241081121 553311714 547334166 25972405 997164454
Output 2
232951579 232951579 232951579 232951579 241081121 25972405 25972405
Comments