order-was-the-dream-of-man-8

Sanket is a very organized person. He likes to organize everything to increase his efficiency. Whenever he sees a list of numbers he like to tag the number in ascending order. Recently he has realized he is wasting a lot of time doing that and thus want you to help him do it faster.
Given a list of numbers [23, 45, 87, 34, 13, 76, 34] it should output another list with the order of the numbers that is [1, 3, 5, 2, 0, 4, 2].  

Input Format
First line has a single integer T that is the number of testcases.
Next 2 lines contains the size of the array N a single integer , followed by the list of numbers.

Output Format
For each list of size N output N integers in a single line indicating the order of numbers.

Constraints

1 ≤ T ≤ 10^4 
1 ≤ N ≤ 10^3
-10^9 ≤ A[i] ≤ 10^9

SAMPLE INPUT
2 
7 
23 45 87 34 13 76 34 
3 
20 40 10

SAMPLE OUTPUT
1 3 5 2 0 4 2 
1 2 0

Source: hackerearth | Difficulty: EASY
Tags: Sorting


Solutions: