#include <bits/stdc++.h> using namespace std ; string s ; int main ( ) { while ( cin >> s ) { for ( int i = 3 ; i >= 0 ; i -- ) cout << s[i] ; cout << endl ; } return 0 ; }