#include <iostream>
using namespace std;
int main() {
char a, b, c, d;
while (cin >> a >> b >> c >> d) { // 注意 while 处理多个 case
cout << d << c << b << a << endl;
}
}
// 64 位输出请用 printf("%lld")

#include <iostream>
using namespace std;
int main() {
char a, b, c, d;
while (cin >> a >> b >> c >> d) { // 注意 while 处理多个 case
cout << d << c << b << a << endl;
}
}
// 64 位输出请用 printf("%lld")