#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>

using namespace std;


int main(){
	char str[20];
	int j = 0;
	memset(str,'\0',sizeof(str));
	while(cin >> str){	
		for(int i = sizeof(str) / sizeof(char) - 1; i >= 0; i--){
			if(str[i] != '\0'){
				cout << str[i];
			}
		}
		cout << endl;
	}

	return 0;
}