#include<>
#include<>
#include<algorithm>
using namespace std; //c++头文件;
int main ()
{
int t;
scanf("%d",&t);
while (t--)
{
int n,i,j;
char a[101];
scanf("%d%s",&n,a); //数字的排序(使用字符数组);
sort (a,a+n); //c++中sort排序;
if(a[0]=='0') //0特殊情况,优先考虑;
{
for(i=1; i<n; i++)
if(a[i]!='0') //0特殊情况,特殊考虑;
{
a[0]=a[i];
a[i]='0'; //不改变顺序,单独调换;
break; //跳出循环;
}
}
printf("%s",a); //输出字符串;
printf("\n");
}
return 0;
}