#include<bits/stdc++.h>
using namespace std;
// write your code here......

#include <string>
#include <algorithm>
#include <cmath>


//方法1 自带的函数库是实现字符串反转
// void reverse_string(string &str)
// {
//     reverse(str.begin(),str.end());
// }

//方法2 自定义函数实现
string &reverse_string(string &str)
{
    int len = str.length();
    for(int i = 0,j = len - 1;i < j;i++,j--)
    {
        char temp = str[i];
        str[i] = str[j];
        str[j] = temp;
    }
    return str;
}

int main(){
    string s;
    getline(cin,s);
    // write your code here......
    
    reverse_string(s);

    
    cout<<s;
    return 0;
}