#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ll, ll> l4;
//typedef pair<double, double> dd;
#define mp make_pair
#define pb push_back
#define mp3(a,b,c) mp(mp(a, b), c)
#define debug(x) cerr << #x << " = " << x << " "


int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n; cin >> n;
  string s;
  const string target = "trygub";
  while (cin >> n >> s)
    {
      map<char, int> ma;
      for (auto e : s) ++ma[e];
      string ans;
      for (auto e : target)
	for (int i = ma[e]; i >= 1; --i)
	  ans.pb(e);
      for (auto e : target) ma[e] = 0;
      for (auto e : ma)
	for (int i = 1; i <= e.second; ++i)
	  ans.pb(e.first);
      reverse(ans.begin(), ans.end());
      cout << ans << '\n';
    }
}
