#include <iostream>
#include <cstring>
using namespace std;
  
int main(){
    char str[21];
    char temp[21];
  
    memset(str, 0, sizeof(str));
    memset(temp, 0, sizeof(temp));
  
    while(cin >> str){
		int i=0;
        int n = strlen(str);
		for(n--; n>=0; ){
            temp[i++] = str[n--];
        }
        cout << temp << endl;
    }
    return 0;
}