#include<iostream>
using namespace std;
#include<string>
#include<sstream>
int main(){
string a;
getline(cin,a);
stringstream s(a);
stringstream ss(a);
string b,c;
string rev;
// int k;
int is_last = 0;
while(s >> b){
is_last++;
}
int trac = 0;
while(ss >> c){
// k=0;
int sz = c.size();
for(int l = sz-1 ; l>=0 ; l--){
// rev[k] = z[l];
rev = rev + c[l];
// k++;
}
trac++;
if(trac == is_last){
cout<<rev;
}else{
cout<<rev<<" ";
}
rev.clear();
rev.shrink_to_fit();
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNpbmNsdWRlPHN0cmluZz4KI2luY2x1ZGU8c3N0cmVhbT4KaW50IG1haW4oKXsKICAgIHN0cmluZyBhOwogICAgZ2V0bGluZShjaW4sYSk7CgogICAgc3RyaW5nc3RyZWFtIHMoYSk7CiAgICBzdHJpbmdzdHJlYW0gc3MoYSk7CgogICAgc3RyaW5nIGIsYzsKICAgIHN0cmluZyByZXY7CgogICAgLy8gaW50IGs7CgogICAgaW50IGlzX2xhc3QgPSAwOwoKICAgIHdoaWxlKHMgPj4gYil7CiAgICAgICAgaXNfbGFzdCsrOwogICAgfQoKICAgIGludCB0cmFjID0gMDsKCiAgICB3aGlsZShzcyA+PiBjKXsKCiAgICAgICAgLy8gaz0wOwogICAgICAgIGludCBzeiA9IGMuc2l6ZSgpOwoKICAgICAgICBmb3IoaW50IGwgPSBzei0xIDsgbD49MCA7IGwtLSl7CiAgICAgICAgICAgIC8vIHJldltrXSA9IHpbbF07CiAgICAgICAgICAgIHJldiA9IHJldiArIGNbbF07CiAgICAgICAgICAgIC8vIGsrKzsKICAgICAgICB9CgogICAgICAgIHRyYWMrKzsKICAgICAgICBpZih0cmFjID09IGlzX2xhc3QpewogICAgICAgICAgICBjb3V0PDxyZXY7CiAgICAgICAgfWVsc2V7CiAgICAgICAgICAgIGNvdXQ8PHJldjw8IiAiOwogICAgICAgIH0KCiAgICAgICAgcmV2LmNsZWFyKCk7CiAgICAgICAgcmV2LnNocmlua190b19maXQoKTsKICAgICAgICAKICAgIH0KCgogICAgcmV0dXJuIDA7Cn0=