#include<bits/stdc++.h>
#define sol(x) cout << x << "\n"
#define pt pair<int, int>
#define ll long long
#define endl '\n'

using namespace std;

void solve(){
	int n;
	cin >> n;
	string s;
	cin >> s;
	string a = "trygub";
	int j = 0;
	string b = "", c = "";
	for(int i = 0; i < n; i++){
		if((int)a.find(s[i]) == -1){
			b+= s[i];
		} else{
			c += s[i];
		}
	}
	sort(c.begin(), c.end());
	string ans = c+b;
	cout << ans << endl;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	cin >> t;
	while(t--)
	solve();
	return 0;
}

