<a href="https://codeforces.com/contest/474/problem/E">https://codeforces.com/contest/474/problem/E</a>
Input Format
.
Output Format
.
Constraints
.
Notice
.
Example
Input
10 3 2 1 3 6 9 11 7 3 20 18
Output
6 1 4 6 7 8 9