const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;

void async function () {
    // Write your code here
    while(line = await readline()){
        // // 方法1:
        // let result = line.split('').reverse().join('');
        // console.log(result)

        // 方法2:
        let result = ''
        for(let i = line.length-1;i>=0;i--){
            result += line[i]
        }
        console.log(result)
    }
}()