#include #include #include #include #include using namespace std; const int maxn=10000010; char str[maxn],t[maxn]; int main() { int T; scanf("%d ",&T); while(T--){ gets(str); int len=strlen(str); int nonzero=0; for(int i=0;i'0') { pos=i;break; } t[0]=str[pos]; for(int i=0;i=1;i--) printf("%c",t[i]); puts(""); } return 0; }