Problem
Since the Industrial Revolution, the global annual temperature has increased. This Climate change is a global phenomenon that largely impacts urban life and squirrels living in the cities. A smart squirrel lives in certain city in which temperature change is a real issue.
The squirrel collects food everyday and as soon as he gets another day having higher temperature than the collection day, he dries and finally preserves the food. The squirrel is busy thus he asked you to help him preserve his food collection.
The squirrel provided a notebook having temperature value of last n days. For each of the ith (1 <= i <= n ) provided days, you have to tell the squirrel the temperature value on which he can dry and preserve the collected food on ith day.
Input
First line contains T denoting the number of test cases.
For each test case
Output
For each test case (in a separate line), print N space-separated integers. the ith (1 <= i <= n) integer denotes higher temperature than the ith day provided.
If you can’t find higher temperature for any of the ith (1 <= i <= n) days, ‘-1’ (without quotes) will be the integer you have to print for ith (1 <= i <= n) day.
Constraints