#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
    string str;
    getline(cin, str);
    copy(str.rbegin(),str.rend(),ostreambuf_iterator<char>(cout));
}