#include <iostream>
#include <string>
using namespace std;
int main()
{
char a[1100];
int i,j,n;
cin >> n;
getchar(); //可以吸收一个空行
for(j = 0; j < n; j++)
{
gets(a); //会产生空行
for(i=strlen(a)-1;i>=0;i--)
{
cout<<a[i];
}
cout<<endl;
}
return 0;
}
#include <string>
using namespace std;
int main()
{
char a[1100];
int i,j,n;
cin >> n;
getchar(); //可以吸收一个空行
for(j = 0; j < n; j++)
{
gets(a); //会产生空行
for(i=strlen(a)-1;i>=0;i--)
{
cout<<a[i];
}
cout<<endl;
}
return 0;
}