// parameter "input" gets all data
function Main(input) {
	var length = input.length;
         var reverse = input.split("").reverse().join("");

    console.log(length === 2 ? input : length === 3 ? reverse : '');
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));