small-string
Source: hackerearth
Difficulty: MEDIUM

You have a string S consisting of N uppercase English letters. You are allowed to perform at most one operation of following kind: Choose any position in the string, remove the character at that position and insert it back to any other place in the string. 

Input

The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.

The first line of each test case contains the single integer N denoting length of string S.

The second line contains the string S.

Output

For each test case, output a single line containing the answer to the corresponding test case.

Constraints

1 ≤ T ≤ 50

1 ≤ N ≤ 50

S will consist of uppercase English letters.

SAMPLE INPUT
2
6
DCBAGH
9
DTHKLPOIJ

SAMPLE OUTPUT
ADCBGH
DHKLPOIJT


from sys import stderr
for i in range(eval(input())):
	n = eval(input())
	s = input().strip()
	res, r = s, s
	for j in range(n):
		t = s[:j] + s[j+1:]
		#print '\n\t', t
		for k in range(n):
			#if j != k:
			r = t[:k] + s[j] + t[k:]
			#print '\n\t\t', r
			if r < res:
				res = r
	print(res)