简单题
#include <iostream>
#include <string>
#include<algorithm>
#include <stdio.h>
using namespace std;
int main()
{
string word;
int u,p ;
cin >> p;
while(p--)
{
cin >> u;
while(u)
{
cin >> word;
reverse(word.begin(),word.end());
cout << word;
if(getchar() == '\n')
{
u--;
cout << endl;
}
else cout <<' ';
}
if(p) cout<<endl;
}
return 0;
}