
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back

int main()
{
    int test;
    cin>>test;
    while(test--)
    {
      int n;
      cin>>n;
      int a[n];
      int ans[110],mx=-1;
      memset(ans,0,sizeof(ans));

      for(int i=0;i<n;i++)
      {
        cin>>a[i];
        ans[a[i]]++;
        mx=max(a[i],mx);
      }
      sort(a,a+n);
      int i=0,c=0;
      while(true)
      {
      	if(ans[i]>0)
      	{
      		cout<<i<<" ";
      		ans[i]--;
      		i++;
      		c++;
      	}
      	else
      		i++;
      	if(c==n)
      		break;
      	if(i==mx+1)
      		i=0;
	  }
		cout<<endl;
    }

    return 0;
          
}