var input = require('fs').readFileSync('/dev/stdin', 'utf8');
function reverseStr(str) {
    var splitString = str.split("");  
    var reverseArray = splitString.reverse(); 
    var joinArray = reverseArray.join("");     
    return joinArray;
}
console.log(reverseStr(input));