#include <bits/stdc++.h>
using namespace std;

#define mk make_pair
#define fi first
#define se second
#define SZ(x) ((int)(x).size())

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

template<typename T> inline void ckmax(T& x, T y) { x = (y > x ? y : x); }
template<typename T> inline void ckmin(T& x, T y) { x = (y < x ? y : x); }

int n, a[105], cnt[105];

void solve_case() {
	cin >> n;
	for (int i = 1; i <= n; ++i) {
		cin >> a[i];
		cnt[a[i]]++;
	}
	for (int i = 0; i <= 100; ++i) {
		if (cnt[i]) {
			cout << i << " ";
			cnt[i]--;
		}
	}
	for (int i = 0; i <= 100; ++i) {
		while (cnt[i] > 0) {
			cout << i << " ";
			cnt[i]--;
		}
	}
	cout << endl;
}
int main() {
	int T; cin >> T; while (T--) {
		solve_case();
	}
	return 0;
}