// i can’t understand why it is giving wrong answer please tell me by giving some testcase for which my code // is getting failed
#include
#include
#include
using namespace std;
bool myCompare(string s1,string s2) {
if(s1.compare(s2)>0)
return true;
else
return false;
}
int main() {
int t;
cin >>t;
while(t--) {
int n;
cin >>n;
string s[n];
for(int i=0;i<n;i++) {
cin>> s[i];
}
sort(s,s+n,myCompare);
for(int i=0;i<n;i++) {
cout<< s[i];
}
cout<< endl;
}
return 0;
}