Problem: 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

Solution (in PYTHON):

Solution:
__author__ = 'Suvojit Manna'

t = raw_input()
while True:
    try:
        n = raw_input()
        arr = [int(i) for i in raw_input().split()]
        ordMap = {x: i for i, x in enumerate(sorted(set(arr)))}
        arr = map(lambda y: ordMap[y], arr)
        for x in arr:
            print x,
        print "\n",
    except:
        break