#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T a) {
  for (auto x : a) cout << x << ' ';
  cout << '\n';
}
const long long INF = 1e9;
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort((a).begin(), (a).end());
  vector<long long> ans;
  ans.push_back(a[0]);
  vector<bool> used(n, false);
  used[0] = true;
  for (long long i = 1; i < n; i++) {
    long long nxt = -1;
    for (long long j = 0; j < n; j++) {
      if (!used[j] && a[j] > ans[i - 1]) nxt = j;
    }
    if (nxt == -1) {
      break;
    }
    used[nxt] = true;
    ans.push_back(a[nxt]);
  }
  for (long long i = 0; i < n; i++)
    if (!used[i]) ans.push_back(a[i]);
  for (long long x : ans) cout << x << ' ';
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
