Given an integer array, for each element in the array check whether there exist a smaller element on the next immediate position of the array. If it exist print the smaller element. If there is no smaller element on the immediate next to the element then print -1.

**Input:**

The first line of input contains an integer T denoting the number of test cases.

The first line of each test case contains an integer N, where N is the size of array.

The second line of each test case contains N integers sperated with a space which is input for the array arr[ ]

**Output:**

For each test case, print in a newline the next immediate smaller elements for each element in the array.

**Constraints:**

1 ≤ T ≤ 100

1 ≤ N ≤ 500

1 ≤ arr[i] ≤ 1000

**Example:**

Input

2

5

4 2 1 5 3

6

5 6 2 3 1 7

Output

2 1 -1 3 -1

-1 2 -1 1 -1 -1

:p | 459 |

Anshul Wadhawan | 414 |

Shivam_Kumar_Singh | 308 |

Calahan | 294 |

facelessman_x | 287 |

Anshul Wadhawan | 874 |

rambo | 868 |

Calahan | 815 |

Suraj Kumar 14 | 768 |

Shivam_Kumar_Singh | 740 |

akhayrutdinov | 4698 |

Ibrahim Nash | 3664 |

sanjay05 | 3633 |

Quandray | 3515 |

surbhi_7 | 2748 |