#include <iostream>
#include <cstring>
#define MAX_SIZE 1024
using namespace std;
int main(void)
{
char line[MAX_SIZE];
while (cin.getline(line, MAX_SIZE))
{
// 根據空白切割字串
char *token = strtok(line, " ");
while (token)
{
// 顛倒印出字串
int length = strlen(token);
for (int i = length - 1; i >= 0; i--)
{
cout << token[i];
}
token = strtok(NULL, " ");
if (token) { cout << " "; }
}
cout << endl;
}
#ifndef ONLINE_JUDGE
system("pause");
#endif
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KCiNkZWZpbmUgTUFYX1NJWkUgMTAyNAoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKHZvaWQpCnsKICAgIGNoYXIgbGluZVtNQVhfU0laRV07CiAgICB3aGlsZSAoY2luLmdldGxpbmUobGluZSwgTUFYX1NJWkUpKQogICAgewogICAgICAgIC8vIOagueaTmuepuueZveWIh+WJsuWtl+S4sgogICAgICAgIGNoYXIgKnRva2VuID0gc3RydG9rKGxpbmUsICIgIik7CiAgICAgICAgd2hpbGUgKHRva2VuKQogICAgICAgIHsKICAgICAgICAgICAgLy8g6aGb5YCS5Y2w5Ye65a2X5LiyCiAgICAgICAgICAgIGludCBsZW5ndGggPSBzdHJsZW4odG9rZW4pOwogICAgICAgICAgICBmb3IgKGludCBpID0gbGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGNvdXQgPDwgdG9rZW5baV07CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHRva2VuID0gc3RydG9rKE5VTEwsICIgIik7CiAgICAgICAgICAgIGlmICh0b2tlbikgeyBjb3V0IDw8ICIgIjsgfQogICAgICAgIH0KCiAgICAgICAgY291dCA8PCBlbmRsOwogICAgfQoKI2lmbmRlZiBPTkxJTkVfSlVER0UKICAgIHN5c3RlbSgicGF1c2UiKTsKI2VuZGlmCgogICAgcmV0dXJuIDA7Cn0K