#include<bits/stdc++.h>
using namespace std;
// write your code here......
void swap(char &a, char &b) {
char temp = a;
a = b;
b = temp;
}
void reverseString(string &str) {
int left = 0;
int right = str.length() - 1;
// 交换字符串中对应位置的字符, 直到左右指针相遇
while (left < right) {
swap(str[left], str[right]);
left++;
right--;
}
}
int main(){
string s;
getline(cin,s);
// write your code here......
reverseString(s);
cout<<s;
return 0;
}



京公网安备 11010502036488号