"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    
    if(S.length === 2) {
        console.log(S.join(""));
    } else {
        console.log(S.reverse().join(""));
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));