#include <bits/stdc++.h>
using namespace std;
typedef unsigned long int ul;
typedef long long int ll;
typedef unsigned long long int  ull;



void solve() {
	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		int arr[n];
		int hash[105] = {};
		for (int i = 0; i < n; i++) {
			cin >> arr[i];
			hash[arr[i]]++;
		}
		vector<int>v;
		int c = 1;
		while (c > 0) {
			c = 0;
			int i = 0;
			while ( i <= 100) {
				if (hash[i] > 0) {
					v.push_back(i);
					hash[i]--;
					c++;
				}
				i++;
			}
		}
		for (auto j : v)cout << j << " ";

		cout << endl;

	}
}
int main()
{
	ios_base::sync_with_stdio(false); cin.tie(NULL);

#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("error.txt", "w", stderr);
	freopen("output.txt", "w", stdout);
#endif
	solve();
	// cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}




