#include <iostream>
#include <string>
using namespace std;

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#define __typeof__ decltype
#endif

#define ITER(c) __typeof__((c).begin())
#define RITER(c) __typeof__((c).rbegin())
#define FOREACH(it, c) for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RFOREACH(it, c) for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)

int main(){
    string s;
    while(cin >> s){
        RFOREACH(it, s){
            cout << *it;
        }
        cout << endl;
    }
    return 0;
}