You are part of a university admissions office and need to keep track of the -th highest test score from applicants in real-time. This helps to determine cut-off marks for interviews and admissions dynamically as new applicants submit their scores.
Input Specification
On the first line, an integers and will be printed: the -th highest score to track and the number of new applicants.
On the second line, space-separated integers, , representing the initial applicant scores.
On the third line, space-separated integers, representing new applicant scores.
Output Specification
On one line, print space-separated integers, representing the -th highest score before the new applicants, then after each new addition.
Constraints
Sample Input 1
3 5
4 5 8
3 6 2 9 4
Sample Output 1
4 4 5 5 6 6
Comments