A string $b$ is a subsequence of a string $a$ if $b$ can be obtained from $a$ by deletion of several (possibly, zero or all) characters. For example, "xy" is a subsequence of "xzyw" and "xy", but not "yx".

You are given a string $a$. Your task is to reorder the characters of $a$ so that "trygub" is not a subsequence of the resulting string.

In other words, you should find a string $b$ which is a permutation of symbols of the string $a$ and "trygub" is not a subsequence of $b$.

We have a truly marvelous proof that any string can be arranged not to contain "trygub" as a subsequence, but this problem statement is too short to contain it.


-----Input-----

The first line contains a single integer $t$ ($1\le t\le 100$) — the number of test cases.

The first line of each test case contains a single integer $n$ ($1\le n\le 200$) — the length of $a$.

The next line contains the string $a$ of length $n$, consisting of lowercase English letters.


-----Output-----

For each test case, output a string $b$ of length $n$ which is a permutation of characters of the string $a$, and such that "trygub" is not a subsequence of it.

If there exist multiple possible strings $b$, you can print any.


-----Examples-----

Input
3
11
antontrygub
15
bestcoordinator
19
trywatchinggurabruh
Output
bugyrtnotna
bestcoordinator
bruhtrywatchinggura


-----Note-----

In the first test case, "bugyrtnotna" does not contain "trygub" as a subsequence. It does contain the letters of "trygub", but not in the correct order, so it is not a subsequence.

In the second test case, we did not change the order of characters because it is not needed.

In the third test case, "bruhtrywatchinggura" does contain "trygu" as a subsequence, but not "trygub".

Difficulty: EASY
Tags: Sorting

Constructive algorithms
Skill types: Sorting

Starter code:

Solutions:
t = int(input())
for items in range(t):
	n = int(input())
	string = ''.join(sorted(input()))
	print(string)


import sys
import math
import collections

def scan(input_type='int'):
	return list(map(int, sys.stdin.readline().strip().split()))

def solution():
	for _ in range(int(input())):
		n = int(input())
		s = input()
		a = [i for i in s]
		a.sort()
		print(''.join(a))
solution()


t = int(input())
for _ in range(t):
	n = int(input())
	a = input()
	i = 0
	for j in range(n):
		if a[j] == 'b':
			a = a[:j] + a[i] + a[j + 1:]
			a = a[:i] + 'b' + a[i + 1:]
			i += 1
	print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	print(''.join(sorted(list(s))))


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	a = [0] * 6
	t = 'trygub'
	for x in s:
		if x == 't':
			a[0] += 1
		elif x == 'r':
			a[1] += 1
		elif x == 'y':
			a[2] += 1
		elif x == 'g':
			a[3] += 1
		elif x == 'u':
			a[4] += 1
		elif x == 'b':
			a[5] += 1
		else:
			print(x, end='')
	for i in range(5, -1, -1):
		print(t[i] * a[i], end='')
	print()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = input()
	target = 'trygub'
	b = ''
	i = 0
	count = 0
	for e in a:
		if i == 5 and e == target[i]:
			count += 1
			continue
		if e == target[i]:
			i += 1
		b += e
	b = 'b' * count + b
	print(b)


t = int(input())
for _ in range(t):
	n = int(input())
	seq = input()
	counter = seq.count('t')
	seq = seq.replace('t', '')
	print(seq + counter * 't')


for _ in range(int(input())):
	n = int(input())
	print(''.join(sorted(input())))


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	l = sorted(s)
	ans = ''.join(l)
	print(ans)


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		A = input()
		ans = ''.join(sorted(A))
		print(ans)
main()


for _ in range(int(input())):
	a = input()
	b = input()
	b = sorted(b)
	b = ''.join(b)
	print(b)


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	print(''.join(sorted(s)))


for t in range(int(input())):
	n = int(input())
	a = sorted([i for i in input()])
	print(*a, sep='')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	s = list(s)
	s.sort()
	print(*s, sep='')


for _ in range(int(input())):
	n = int(input())
	s = input()
	out = []
	c = 0
	for i in s:
		if i == 't':
			c += 1
		else:
			out.append(i)
	for i in range(c):
		out.append('t')
	print(''.join(out))


t = int(input())
while t != 0:
	n = int(input())
	flag = 0
	string = input()
	print(''.join(sorted(string)))
	t = t - 1


for _ in range(int(input())):
	n = int(input())
	s = str(input())
	k = sorted(s)
	print(''.join(k))


for ctr in range(int(input())):
	n = int(input())
	a = input().strip()
	k = a.count('t')
	a = a.replace('t', '')
	print(a + 't' * k)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	n = inp()
	lst = insr()
	o = 0
	s = ''
	for i in range(n):
		if lst[i] == 't':
			o = o + 1
		else:
			s = s + lst[i]
	print(s + 't' * o)


def is_subseq(x, y):
	it = iter(y)
	return all((c in it for c in x))
for _ in range(int(input())):
	length = int(input())
	word = input()
	if not is_subseq('trygub', word):
		print(word)
	else:
		word = [char for char in word]
		tindices = [i for (i, x) in enumerate(word) if x == 't']
		rindices = [i for (i, x) in enumerate(word) if x == 'r']
		indices = sorted(tindices + rindices)
		for i in range(len(rindices)):
			word[indices[i]] = 'r'
		for i in range(len(tindices)):
			word[indices[len(rindices) + i]] = 't'
		print(''.join(word))


a = int(input())
for j in range(a):
	cips = input()
	vards = input()
	print(''.join(sorted(vards)))


for _ in range(int(input())):
	n = int(input())
	a = str(input())
	print(''.join(sorted(a)))


for tt in range(int(input())):
	n = int(input())
	s = input()
	print(''.join(sorted(s)))


t = int(input())
for tc in range(t):
	sl = int(input())
	s = input()
	const_di = {'t': 0, 'r': 0, 'y': 0, 'g': 0, 'u': 0, 'b': 0}
	ans = ''
	for i in s:
		if i in const_di:
			const_di[i] += 1
		else:
			ans += i
	for i in 'bugyrt':
		ans += i * const_di[i]
	print(ans)


import io
import os
import sys
import math
import heapq
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	s = input().rstrip()
	s = sorted(s)
	print(''.join(s))


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()

def FACT(n, mod):
	s = 1
	facts = [1]
	for i in range(1, n + 1):
		s *= i
		s %= mod
		facts.append(s)
	return facts[n]

def C(n, k, mod):
	return FACT(n, mod) * pow(FACT(k, mod) * FACT(n - k, mod) % mod, mod - 2, mod) % mod
t = II()
for q in range(t):
	n = II()
	s = list(SI())
	count = 0
	for i in range(n):
		if s[i] == 't':
			s[i] = ''
			count += 1
	s += ['t'] * count
	print(''.join(s))


def func():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = input().strip()
		print(''.join(sorted(s)))
func()


import sys
import os
from io import BytesIO, IOBase
from collections import Counter
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
T = int(input())
for _ in range(T):
	_ = int(input())
	s = list(input())
	print(''.join(sorted(s)))


for t in range(int(input())):
	n = int(input())
	s = list(input())
	d = {}
	for i in s:
		if i not in d:
			d[i] = 1
		else:
			d[i] += 1
	d = dict(sorted(d.items(), key=lambda x: x[0]))
	k = ''
	for i in d:
		k += d[i] * i
	print(k)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import ceil, floor, sqrt
from collections import Counter, defaultdict, deque

def int1():
	return int(input())

def map1():
	return map(int, input().split())

def list1():
	return list(map(int, input().split()))
mod = pow(10, 9) + 7

def solve():
	n = int1()
	l1 = list(input())
	l1.sort()
	v = ''.join(l1)
	print(v)
for _ in range(int(input())):
	solve()


needed = 'trygub'

def swap(string, first, second):
	output = string
	output = output[:second] + output[first] + output[second + 1:]
	output = output[:first] + string[second] + output[first + 1:]
	return output

def get_checklist(string, needed):
	checklist = []
	contains_needed = False
	next_needed = 0
	for char in range(len(string)):
		if string[char] == needed[next_needed]:
			checklist.append(char)
			if next_needed != len(needed) - 1:
				next_needed += 1
			else:
				contains_needed = True
				break
	return (checklist, contains_needed)
n_iter = int(input())
output = []
for iter in range(n_iter):
	size = int(input())
	string = input()
	(checklist, contains_needed) = get_checklist(string, needed)
	while contains_needed:
		string = swap(string, checklist[0], checklist[len(needed) - 1])
		(checklist, contains_needed) = get_checklist(string, needed)
	output.append(string)
for string in output:
	print(string)


from collections import defaultdict
from queue import LifoQueue
import math

def print_sol(c, sol):
	print('Case #{}: {}'.format(c, sol))

def rd_int():
	return int(input())

def rd_str():
	return input()

def rd_str_lst():
	return input().split(' ')

def sp_str_lst():
	return list(input())

def rd_int_lst():
	return [int(i) for i in rd_str_lst()]

def sp_int_lst():
	return [int(i) for i in sp_str_lst()]

def dfs(g, i, v):
	v[i] = True
	for j in g[i]:
		if not v[j]:
			dfs(g, j, v)
	print(i)

def dfs_iter(g, i, n):
	v = [False] * n
	stack = LifoQueue()
	stack.put(i)
	while stack.not_empty:
		u = stack.get()
		v[u] = True
		print(u)
		for i in g[u]:
			if not v[i]:
				stack.put(i)

def is_prime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	for i in range(2, math.floor(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def first_divisor(n):
	for i in range(2, math.floor(math.sqrt(n)) + 1):
		if n % i == 0:
			return i
	return None

def main():
	t = rd_int()
	for c in range(1, t + 1):
		n = rd_int()
		a = list(rd_str())
		a.sort()
		print(''.join(a))
main()


t = int(input())
for k in range(t):
	n = int(input())
	print(''.join(sorted(input())))


for _ in range(int(input())):
	n = int(input())
	c = input()
	c = c.replace('t', '')
	c += 't' * (n - len(c))
	print(c)


t = int(input())
for j in range(0, t):
	s = int(input())
	inp = []
	inp_str = input()
	for i in inp_str:
		inp.append(i)
	l2 = ['r', 'y', 'g', 'u', 'b']
	matched = False
	m = '*'
	for i in l2:
		for k in inp:
			if i == k:
				matched = True
				m = i
				break
		if matched == True:
			break
	count = 0
	if matched == False:
		print(inp_str)
	else:
		for i in range(0, s):
			if inp[i] == m:
				count += 1
				inp[i] = '.'
		for i in range(0, count):
			print(m, end='')
		for i in inp:
			if i != '.':
				print(i, end='')
		print()


def solve():
	n = int(input())
	s = input()
	print(''.join(sorted(s)))
t = int(input())
for _ in range(t):
	solve()


t = int(input())
length_list = [None] * t
stringl_list = [None] * t
for i in range(t):
	length_list[i] = int(input())
	stringl_list[i] = list(input())
for l in stringl_list:
	l.sort()
	print(''.join(l))


t = int(input())
for i in range(t):
	n = int(input())
	a = input()
	check = []
	trygub = 'trygub'
	k = 0
	for j in range(len(trygub)):
		for m in range(k, len(a)):
			if trygub[j] == a[m]:
				check.append(a[m])
				k = m + 1
				break
			else:
				continue
	c = ''
	if len(trygub) == len(check):
		c = a[a.find('b'):] + a[:a.find('b')]
		add = c.count('b')
		b = c.replace('b', '')
		for k in range(add):
			b = 'b' + b
		print(b)
	else:
		print(a)


import sys
input = sys.stdin.buffer.readline
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rs = lambda : input().decode().rstrip('\n\r')
wrt = sys.stdout.write
pr = lambda *args, end='\n': wrt(' '.join([str(x) for x in args]) + end)
xrange = lambda *args: reversed(range(*args))
cdiv = lambda x, y: -(-x // y)
enum = enumerate
inf = float('inf')
mod = 10 ** 9 + 7
from collections import defaultdict as dd, Counter
from queue import deque
Testcase = ri()
for testcase in range(Testcase):
	(n,) = rl()
	s = rs()
	c = Counter(s)
	a = ''
	for i in 'abcdefghijklmnopqrstuvwxyz':
		a += i * c[i]
	print(a)


for i in range(int(input())):
	n = int(input())
	string = input()
	string = ''.join(sorted(string))
	print(string)


from sys import exit, stderr, stdout

def debug(*args):
	for i in args:
		stderr.write(str(i) + ' ')
	stderr.write('\n')
for _ in range(int(input())):
	n = int(input())
	s = input()
	(pref, suff) = ('', '')
	for c in s:
		if c == 't':
			suff += c
		else:
			pref += c
	print(pref + suff)


t = int(input())
for q in range(t):
	z = int(input())
	x = list(input())
	print(''.join(sorted(x)))


tst = int(input())
for t in range(tst):
	n = int(input())
	s = input()
	string = ''
	cnt = 0
	for ch in s:
		if ch == 'g':
			cnt += 1
		else:
			string += ch
	string += 'g' * cnt
	print(string)


for s in [*open(0)][2::2]:
	print(''.join(sorted(s[:-1])))


maxK = 51
maxN = 10001
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	bs = 0
	for ch in s:
		if ch == 'b':
			bs += 1
	for _ in range(bs):
		print('b', end='')
	for ch in s:
		if ch != 'b':
			print(ch, end='')
	print()


def solve():
	input()
	s = sorted(input())
	print(''.join(s))
input()
while True:
	try:
		solve()
	except EOFError:
		exit()


t1 = int(input())
ans = []
for i in range(t1):
	n = int(input())
	c = list(input())
	c1 = ''
	t = c.count('t')
	r = c.count('r')
	y = c.count('y')
	g = c.count('g')
	u = c.count('u')
	b = c.count('b')
	if t == 0 and r == 0 or y == 0 or g == 0 or (u == 0) or (b == 0):
		pass
	else:
		for k in range(t):
			v = c.index('t')
			c.pop(v)
			c.append('t')
	for k in range(n):
		c1 += c[k]
	ans.append(c1)
for i in range(t1):
	print(ans[i])


from collections import Counter
for y in range(int(input())):
	n = int(input())
	s = input()
	dic = Counter(s)
	for i in dic:
		if i != 't' and i != 'r' and (i != 'y') and (i != 'g') and (i != 'u') and (i != 'b'):
			print(i * dic[i], end='')
	print('r' * dic['r'] + 't' * dic['t'] + 'g' * dic['g'] + 'y' * dic['y'] + 'b' * dic['b'] + 'u' * dic['u'])


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter
from pprint import pprint
from itertools import permutations

def main():
	n = int(input())
	s = input()
	ans = []
	cnt = 0
	for c in s:
		if c != 't':
			ans.append(c)
		else:
			cnt += 1
	ans += ['t'] * cnt
	print(''.join(ans))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	main()


for _ in range(int(input())):
	a = int(input())
	s = input()
	print(''.join(sorted(s)))


import sys, collections, math, itertools, random
INF = sys.maxsize

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	s = input()
	ss = list(sorted(s))
	ans = ''
	print(ans.join(ss))


for i in range(int(input())):
	print(0 * input() + ''.join(sorted(input())))


t1 = int(input())
answer = ['t', 'r', 'y', 'g', 'u', 'b']
for z in range(t1):
	n = int(input())
	a = list(input())
	a.sort()
	for i in range(n):
		print(a[i], end='')
	print()


daudz = int(input())
while daudz > 0:
	liel = int(input())
	vards = input()
	vards = sorted(vards)
	vards = ''.join(vards)
	print(vards)
	daudz = daudz - 1


for _ in range(int(input())):
	n = int(input())
	s = input()
	l = sorted(s)
	w = ''
	for i in l:
		w = w + i
	print(w)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(input())
	if 't' in a:
		m = a.count('t')
		for i in range(m):
			s = a.pop(a.index('t'))
			a.append(s)
		ans = ''
		for i in a:
			ans = ans + i
		print(ans)
	else:
		ans = ''
		for i in a:
			ans = ans + i
		print(ans)


for i in range(int(input())):
	n = int(input())
	s = sorted(list(input()))
	print(''.join(s))


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ss = sorted(s)
	print(str(''.join(ss)))


for _ in range(int(input())):
	n = int(input())
	s = input()
	c = s.count('g')
	new = s.replace('g', '')
	result = 'g' * c + new
	print(result)


t = int(input())
while t:
	n = int(input())
	s = input()
	s = sorted(s)
	ans = ''
	for i in s:
		ans += i
	print(ans)
	t -= 1


import sys
input = sys.stdin.readline
import math
for _ in range(int(input())):
	n = int(input())
	s = input().rstrip()
	d = dict()
	for i in range(n):
		if s[i] not in d:
			d[s[i]] = 0
		d[s[i]] += 1
	count = 0
	if 't' in d:
		count = d['t']
	for c in d:
		if c != 't':
			print(c * d[c], end='')
	print('t' * count)


import sys
input = sys.stdin.readline
for TEST in range(int(input())):
	l = int(input())
	w = [0 for i in range(26)]
	for c in input().rstrip():
		w[ord(c) - ord('a')] += 1
	for i in range(25, -1, -1):
		while w[i] > 0:
			w[i] -= 1
			print(chr(ord('a') + i), end='')
	print()


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in [wtf[i:i + 2] for i in range(1, len(wtf), 2)]:
	n = int(t[0])
	print(''.join(sorted(t[1])))


t = int(input())
for i in range(t):
	n = int(input())
	a = input().strip()
	s = 'trygub'
	bool = True
	for x in s:
		if x in a:
			i = a.index(x)
			s = s[i + 1:]
		else:
			bool = False
			break
	if bool:
		print(''.join(sorted(a)))
	else:
		print(a)


for _ in [0] * int(input()):
	input()
	print(''.join(sorted(str(input()))))


N_test = int(input())
for i in range(N_test):
	word_lenght = int(input())
	word = input()
	word_list = list(word)
	word_list.sort()
	word = ''
	for i in word_list:
		word += i
	print(word)


for _ in range(int(input())):
	x = int(input())
	lis = input()
	l2 = sorted(lis)
	n = ''
	for i in l2:
		n += i
	print(n)


tc = int(input())
while tc:
	sz = int(input())
	str = input()
	nstr = str.replace('b', '')
	sub = len(str) - len(nstr)
	for i in range(sub):
		print('b', end='')
	print(nstr)
	tc -= 1


t = int(input())
sub1 = 'trygub'
for i in range(t):
	n = int(input())
	s = input()
	temp = ''
	ls = list(s)
	while True:
		c = 0
		for i in sub1:
			try:
				ls.remove(i)
				temp = i + temp
				c += 1
			except:
				pass
		if c == 0:
			break
	s = ''.join(ls) + ''.join(sorted(temp))
	print(s)


n = int(input())
for i in range(n):
	l = int(input())
	s = input()
	print(''.join(sorted(s)))


from sys import stdout, stdin, maxsize
from collections import defaultdict, deque
import math
import bisect
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	s = input()
	print(''.join(sorted(s)))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = input()
	ss = []
	for i in s:
		ss.append(i)
	ss.sort()
	for i in ss[:-1]:
		print(i, end='')
	print(ss[-1])


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = input()
		a = list(a)
		a.sort()
		a = ''.join(a)
		print(a)
main()


trygub = 'trygub'
result = []
t = int(input())
for i in range(t):
	m = []
	l = int(input())
	n = input()
	for j in trygub:
		if j in n:
			m.append(j)
	if ''.join(m) == 'trygub':
		result.append(''.join(sorted(n)))
	else:
		result.append(n)
for p in result:
	print(p)


for _ in range(int(input())):
	n = int(input())
	a = input()
	t = 0
	r = 0
	y = 0
	g = 0
	u = 0
	b = 0
	other = ''
	for i in a:
		if i == 't':
			t += 1
		elif i == 'r':
			r += 1
		elif i == 'y':
			y += 1
		elif i == 'g':
			g += 1
		elif i == 'u':
			u += 1
		elif i == 'b':
			b += 1
		else:
			other += i
	print('r' * r + 't' * t + 'g' * g + 'y' * y + 'b' * b + 'u' * u + other)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def shuffle(string_list, num):
	for i in range(0, len(string_list) - num, num):
		(string_list[i], string_list[i + num - 1]) = (string_list[i + num - 1], string_list[i])
	return string_list

class Solution:

	def solve(self, string_list):
		return ''.join(sorted(string_list))
n = inp()
A = Solution()
for i in range(n):
	length = inp()
	string_list = insr()
	print(A.solve(string_list))


for _ in range(int(input())):
	N = int(input())
	S = ''.join(sorted(input()))
	print(S)


t = int(input())
for i in range(t):
	n = int(input())
	a = input()
	n = a.count('b')
	x = a.replace('b', '')
	ans = 'b' * n
	ans += x
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = input()
	b = list(a)
	b.sort()
	print(''.join(b))


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(input())
	countt = 0
	countr = 0
	st = ''
	for i in range(n):
		if s[i] == 't':
			countt += 1
		elif s[i] == 'r':
			countr += 1
		else:
			st += s[i]
	k = countr * 'r' + st + countt * 't'
	print(k)


for _ in range(int(input())):
	n = int(input())
	s = input()
	arr = ''.join(sorted(s))
	print(arr)


for __ in range(int(input())):
	n = int(input())
	ar = input()
	l = 'b' * ar.count('b')
	for i in range(n):
		if ar[i] != 'b':
			l += ar[i]
	print(l)


inpt = input().split()
inpt = list(map(int, inpt))
for i in range(inpt[0]):
	string = input()
	string = input()
	ans = ''
	print(ans.join(sorted(string)))


t = int(input())
new = []
for i in range(t):
	my_str = []
	n = int(input())
	l = input()
	for j in range(n):
		my_str.append(ord(l[j]))
	my_str.sort()
	for k in range(n):
		my_str[k] = chr(my_str[k])
	new.append(my_str)
for i in range(t):
	print(*new[i], sep='')


for t in range(int(input())):
	n = int(input())
	s = input()
	k = s.count('t')
	s = s.replace('t', '', k)
	print(s + 't' * k)


from sys import *
from collections import defaultdict as dd
from math import *
from bisect import *

def sinp():
	return input()

def inp():
	return int(sinp())

def minp():
	return map(int, sinp().split())

def linp():
	return list(minp())

def strl():
	return list(sinp())

def pr(x):
	print(x)
mod = int(1000000000.0 + 7)
for _ in range(inp()):
	n = inp()
	s = sinp()
	pr(''.join(sorted(s)))


for _ in range(int(input())):
	n = int(input())
	test = 'trygub'
	i = 0
	s = input()
	for c in s:
		if i <= 5:
			if c == test[i]:
				i += 1
		else:
			break
	if i == 6:
		a = ''
		c = 0
		for i in s:
			if i == 'b':
				c += 1
			else:
				a += i
		print('b' * c + a)
	else:
		print(s)


def solve(n):
	s = input()
	b = s.count('b')
	return 'b' * b + s.replace('b', '')
for _ in range(int(input())):
	print(solve(int(input())))


from sys import stdin
sin = stdin.readline
t = int(sin())
while t:
	sin()
	us = {}
	for i in sin():
		try:
			us[i] += 1
		except KeyError:
			us[i] = 1
	for i in 'abcdefghijklmnopqrstuvwxyz':
		try:
			print(i * us[i], end='')
		except KeyError:
			pass
	print()
	t -= 1


x = int(input())
for j in range(0, x):
	m = int(input())
	n = input()
	t = list(n)
	s = ''
	t.sort()
	print(s.join(t))


for s in [*open(0)][2::2]:
	print(*sorted(s), sep='')


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import new_class
for _ in range(int(input())):
	n = int(input())
	a = input()
	for x in a:
		if x != 'u':
			print(x, end='')
	print('u' * a.count('u'))


import os
from collections import Counter
from io import BytesIO, IOBase
import sys
from math import inf

def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(input().strip())
		x = []
		y = []
		for i in range(n):
			if a[i] in 'trygub':
				x.append(i)
				y.append(a[i])
		z = Counter(y)
		y = ''
		op = 'bugyrt'
		for i in op:
			y = y + i * z[i]
		p = 0
		m = len(x)
		for j in range(n):
			if a[j] in 'trybug':
				a[j] = y[p]
				p += 1
		print(''.join(a))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	n = int(input())
	s = list(input())
	p = ''
	s.sort()
	p = p.join(s)
	print(p)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import defaultdict as dd
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdmap = lambda : map(int, stdstr().split())
stdarr = lambda : list(map(int, stdstr().split()))
mod = 1000000007
for _ in range(stdint()):
	n = stdint()
	s = input()
	l = sorted(s)
	print(''.join(l))


def Solve():
	input()
	print(''.join(sorted(input())))
for _ in range(int(input())):
	Solve()


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(input())
	s.sort()
	print(''.join((str(i) for i in s)))


y122 = int(input())
for _ in range(y122):
	s = input()
	s = input()
	s = sorted(s)
	print(''.join(s))


def helper(s):
	p = sorted(s)
	return ''.join(p)
test = int(input())
for i in range(test):
	n = int(input())
	s = input()
	ans = helper(s)
	print(ans)


t = int(input(''))
for k in range(t):
	n = int(input(''))
	s = input('')
	stri = 'trygub'
	l = list(s)
	l.sort()
	print(''.join(l))


for _ in range(int(input())):
	input()
	s = input()
	print(''.join(sorted(list(s))))


import sys

def rl(proc=None):
	if proc is not None:
		return proc(sys.stdin.readline())
	else:
		return sys.stdin.readline().rstrip()

def srl(proc=None):
	if proc is not None:
		return list(map(proc, rl().split()))
	else:
		return rl().split()

def solve(S):
	x = [c for c in S if c != 'b']
	r = [c for c in S if c == 'b']
	return ''.join(r) + ''.join(x)

def main():
	T = rl(int)
	for t in range(1, T + 1):
		rl()
		S = rl()
		print(solve(S))
main()


for i in range(int(input())):
	n = int(input())
	m = input()
	print(''.join(sorted(m)))


for u in range(int(input())):
	n = int(input())
	s = input()
	print(''.join(sorted(s)))


t = int(input())
while t > 0:
	a = int(input())
	s = str(input())
	k = ''.join(sorted(s))
	print(k)
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = input()
	s = 'trygub'
	s = s[::-1]
	d = {}
	for i in range(n):
		d[a[i]] = d.get(a[i], 0) + 1
	ans = ''
	for i in s:
		x = d.get(i, 0)
		if x > 0:
			ans = ans + x * i
			d[i] = 0
	for i in d:
		ans = ans + d[i] * i
	print(ans)


def Convert(string):
	list1 = []
	list1[:0] = string
	return list1
a = int(input())
b = 0
while b < a:
	c = int(input())
	d = Convert(input())
	e = 0
	f = 0
	while e < c:
		if d[e] == 't':
			d.pop(e)
			f = f + 1
			e = e - 1
			c = c - 1
		e = e + 1
	e = 0
	while e < f:
		d.extend('t')
		e = e + 1
	b = b + 1
	print(''.join(d))


t = int(input())
for _ in range(t):
	n = int(input())
	a = input().strip()
	r = ''
	for i in a:
		if i == 'b':
			r = i + r
		else:
			r += i
	print(r)


q = ''
for x in range(int(input())):
	n = int(input())
	st = input()
	s = ''
	b = 0
	for x in st:
		if x == 'b':
			b += 1
		else:
			s += x
	q += 'b' * b + s + '\n'
print(q[:-1])


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	cnt = 0
	for i in s:
		if i == 't':
			cnt += 1
	s = ''.join([i for i in s if i != 't']) + 't' * cnt
	print(s)


for _ in range(int(input())):
	input()
	n = [i for i in input()]
	n.sort()
	print(''.join(n))


n = int(input())
words = []

def func(j):
	b = sorted(j[1])
	if 'trygub' not in b:
		print(''.join(b))
for i in range(n):
	len_i = int(input())
	word_i = input()
	words.append([len_i, word_i])
for i in words:
	func(i)


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	t = s.count('t')
	r = s.count('r')
	y = s.count('y')
	g = s.count('g')
	u = s.count('u')
	b = s.count('b')
	if t > 0 and r > 0 and (y > 0) and (g > 0) and (u > 0) and (b > 0):
		v = ''
		for i in range(b):
			v += 'b'
		for i in range(u):
			v += 'u'
		for i in range(g):
			v += 'g'
		for i in range(y):
			v += 'y'
		for i in range(r):
			v += 'r'
		for i in range(t):
			v += 't'
		for i in s:
			if i != 't' and i != 'r' and (i != 'y') and (i != 'g') and (i != 'u') and (i != 'b'):
				v += i
		print(v)
	else:
		print(s)


for _ in range(int(input())):
	n = int(input())
	str = input()
	s = ''
	p = ''
	for i in str:
		if i == 'r':
			s = s + i
		else:
			p = p + i
	print(s + p)


ReadStr = lambda : input()
ReadIntList = lambda : list(map(int, input().split()))
ReadStrList = lambda : list(map(str, input().split()))
ReadInt = lambda : int(input())
ReadMultipleValues = lambda : map(int, input().split())
ReadMultipleValuesStr = lambda : map(str, input().split())
for _ in range(ReadInt()):
	n = ReadInt()
	string = sorted(ReadStr())
	print(''.join(string))


import sys
import math
input = sys.stdin.readline
from collections import deque
from queue import LifoQueue

def binary_search(a, n):
	L = 0
	R = len(a) - 1
	while L <= R:
		mid = L + (R - L) // 2
		if a[mid] == n:
			return mid
		elif a[mid] < n:
			L = mid + 1
		else:
			R = mid - 1
	return -1
for _ in range(int(input())):
	n = int(input())
	s = input()
	for i in range(n):
		if s[i] == 'b':
			s = 'b' + s[:i] + s[i + 1:]
	print(s)


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	n = input()
	ss = list(input())
	tc = ss.count('t')
	res = [s for s in ss if s != 't'] + ['t'] * tc
	print(''.join(res))

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


tt = int(input())
for _ in range(tt):
	n = int(input())
	string = list(input())
	out = ''
	(t, y, r, g, u) = (0, 0, 0, 0, 0)
	for char in string:
		if char == 't':
			t += 1
		elif char == 'y':
			y += 1
		elif char == 'r':
			r += 1
		elif char == 'g':
			g += 1
		elif char == 'u':
			u += 1
		else:
			out += char
	out += 'u' * u + 'g' * g + 'r' * r + 'y' * y + 't' * t
	print(out)


t = int(input())
for z in range(t):
	n = int(input())
	arr = list(input())
	arr.sort()
	s = ''.join(arr)
	print(s)


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
from collections import defaultdict
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=300006, func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater

class TrieNode:

	def __init__(self):
		self.children = [None] * 26
		self.isEndOfWord = False

class Trie:

	def __init__(self):
		self.root = self.getNode()

	def getNode(self):
		return TrieNode()

	def _charToIndex(self, ch):
		return ord(ch) - ord('a')

	def insert(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				pCrawl.children[index] = self.getNode()
			pCrawl = pCrawl.children[index]
		pCrawl.isEndOfWord = True

	def search(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				return False
			pCrawl = pCrawl.children[index]
		return pCrawl != None and pCrawl.isEndOfWord

class Node:

	def __init__(self, data):
		self.data = data
		self.count = 0
		self.left = None
		self.right = None

class BinaryTrie:

	def __init__(self):
		self.root = Node(0)

	def insert(self, pre_xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = pre_xor & 1 << i
			if val:
				if not self.temp.right:
					self.temp.right = Node(0)
				self.temp = self.temp.right
				self.temp.count += 1
			if not val:
				if not self.temp.left:
					self.temp.left = Node(0)
				self.temp = self.temp.left
				self.temp.count += 1
		self.temp.data = pre_xor

	def query(self, xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = xor & 1 << i
			if not val:
				if self.temp.left and self.temp.left.count > 0:
					self.temp = self.temp.left
				elif self.temp.right:
					self.temp = self.temp.right
			elif self.temp.right and self.temp.right.count > 0:
				self.temp = self.temp.right
			elif self.temp.left:
				self.temp = self.temp.left
			self.temp.count -= 1
		return xor ^ self.temp.data
for ik in range(int(input())):
	n = int(input())
	s = list(input())
	s.sort()
	print(*s, sep='')


tests = int(input())
for test in range(tests):
	n = int(input())
	s = input()
	s = sorted(s)
	print(''.join(s))


for _ in range(int(input())):
	x2 = input()
	x = input()
	x1 = 'trygub'
	t = 0
	newX = sorted(x)
	for letters in range(len(x)):
		if x[letters] == x1[t]:
			t += 1
			if t == 5:
				print(''.join(newX))
				break
	if t != 5:
		print(x)


import time, math as mt, bisect as bs, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj

def sieve():
	li = [True] * (10 ** 3 + 5)
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	(prime, cur) = ([0] * 200, 0)
	for i in range(10 ** 3 + 5):
		if li[i] == True:
			prime[cur] = i
			cur += 1
	return prime

def SPF():
	mx = 10 ** 6 + 1
	spf[1] = 1
	for i in range(2, mx):
		if spf[i] == 1000000000.0:
			spf[i] = i
			for j in range(i * i, mx, i):
				if i < spf[j]:
					spf[j] = i
	return

def prime(n, d):
	prm = set()
	while n != 1:
		prm.add(spf[n])
		n = n // spf[n]
	for ele in prm:
		d[ele] = d.get(ele, 0) + 1
	return
mod = 998244353

def solve():
	n = II()
	s = stdin.readline()
	cnt = 0
	for i in range(n):
		ele = s[i]
		if ele == 'b':
			cnt += 1
	ini = 'b' * cnt
	for i in range(n):
		ele = s[i]
		if ele != 'b':
			ini += ele
	print(ini)
	return
t = II()
for i in range(t):
	solve()


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for k in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** (-10)
for _ in range(INT()):
	N = INT()
	S = input()
	ans = sorted(S)
	print(''.join(ans))


t = int(input())
r = []
for i in range(t):
	n = int(input())
	s = list(str(input()))
	s.sort()
	r.append(s)
for i in r:
	for j in i:
		print(j, end='')
	print()


import os, sys
from io import BytesIO, IOBase
from collections import Counter
from string import ascii_lowercase as al

def main():
	for _ in range(int(input())):
		n = int(input())
		s = input().strip()
		x = Counter(s)
		ls = []
		for i in al:
			for z in range(x[i]):
				ls.append(i)
		print(''.join(ls))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()