#include<bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define pii pair<int,int>
#define pll pair<long long int,long long int>
#define mii map<int,int>
#define mll map<long long int,long long int>
#define rep(it,m) for(auto it=m.begin();it!=m.end();it++)
#define pb push_back
#define fr first
#define sc second
#define mod 1000000007
#define setbiti(x) __builtin_popcount(x)
#define setbitll(x) __builtin_popcountll(x)
#define vi vector<int>
#define vll vector<long long int>
#define f(i,x,n) for(int i=x;i<n;i++)
#define l(i,a,b) for(int i=a;i>b;i--)
#define w(x) int x; cin>>x; while(x--)
#define all(x) x.begin(),x.end()
#define fill(a,x)  memset(a,x,sizeof(a))
#define pie 3.14159265
using namespace std;

void fio() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

int main() {
    fio();
    w(t) {
        int n;
        cin >> n;
        vi vec(n);
        int cnt[105] {0};
        f(i, 0, n) {
            cin >> vec[i];
            cnt[vec[i]]++;
        }
        vi b;
        f(i, 0, 105) {
            if (cnt[i] > 0) {
                b.pb(i);
                cnt[i]--;
            }
        }
        f(i, 0, 105) {
            if (cnt[i] > 0) {
                while (cnt[i] > 0) {
                    b.pb(i);
                    cnt[i]--;
                }
            }
        }
        f(i, 0, n) {
            cout << b[i] << " ";
        }
        cout << endl;
    }
    return 0;
}