You are given a sequence of $$$n$$$ non-negative integers $$$a = [a_1, a_2, \dots, a_n]$$$.
You can perform the following operation any number of times:
Find the lexicographically smallest sequence that can be obtained by performing such operations.
Recall that MEX of a sequence is a minimum non-negative integer that does not belong to the sequence.
A sequence $$$a$$$ is lexicographically smaller than a sequence $$$b$$$ if and only if one of the following holds:
The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 5 \cdot 10^5$$$).
The second line contains $$$n$$$ integers $$$a_1, a_2, a_3, \dots, a_n$$$ ($$$0 \le a_i \le 10^9$$$).
The sum of $$$n$$$ over all test cases does not exceed $$$5 \cdot 10^5$$$.
For each test case, output $$$n$$$ integers — the lexicographically smallest sequence that can be obtained by performing such operations.
470 3 0 1 2 4 040 1 2 351 0 1 0 131 3 5
0 1 0 1 2 3 0 0 1 2 3 0 0 1 0 1 0 0 0
In the first test case, you can perform such $$$2$$$ operations:
In the second test case, you can perform no operations.
In the third test case, you can perform a single operation: