A list of N nodes is given. Each node is having some value. There K nodes to be deleted. A node is to be deleted according to the following algorithm:
flag=false
for i = 1 to list_length-1{
if (list[i].val< list[i+1].val)
delete i th node
flag=true
break
if(flag == false)
delete the last node
Input Format:
First line contains T number of test cases. First line of each test case contains N, the number of nodes and K ,the number of nodes to be deleted. Followed by n space separated integers.
Output Format:
Print the contents of list after deletion.
Constraints
All the numbers are well with in the integer range.