process.stdin.resume();
process.stdin.setEncoding('utf8');

// Get lines from standard input.
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split("\n");
// For each of the lines, use for because it is faster than foreach
for (var counter = 0; counter < lines.length; counter++) {
	 // Split on space
     var line = lines[counter];
     console.log(line.split("").reverse().join(""));
}