#include<bits/stdc++.h>
#define ll long long 
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define MOD 1000000007 
#define fr(i,a,b) for(int i=a;i<b;i++)
// bitch don't hack my code otherwise i will punish you like real daddy!!
using namespace std;
int gcd(ll a,ll b){
	if(b==0) return a;
    return gcd(b,a%b);
}
int sumofdigits(int n){
	int sum=0;
	while(n){
	 int r=n%10;
	 sum+=r;
	 n/=10;
	}
	return sum%3;
}
float rounding(float n){
	float value=(int)(n*100+0.5);
	return (float)value/100;
}
int main()
{ fastio
  int t; cin>>t;
  while(t--){
  	int n; cin>>n;
    int a[n]; set<int> s;
    int b[101]; memset(b,-1,sizeof(b));
    fr(i,0,n){
    	cin>>a[i];
    	b[a[i]]++;
    	s.insert(a[i]);
	}
	for(auto x:s) cout<<x<<" ";
	fr(i,0,101){
		if(b[i]>0){
			while(b[i]--){
				cout<<i<<" ";
			}
		}
	}
	cout<<endl;
  }
  }
  
