var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var p = input.split("\n");
function reverseStr(str) {
    var splitString = str.split("");  
    var reverseArray = splitString.reverse(); 
    var joinArray = reverseArray.join("");     
    return joinArray;
}
for(var i=0; i<p.length; i++){
console.log(reverseStr(p[i]));
}