class Program {
  static Main(input) {
    const length = input.length;
    const reverse = input.split("").reverse().join("");

    console.log(length === 2 ? input : length === 3 ? reverse : '');
  }
}

Program.Main(require('fs').readFileSync('dev/stdin', 'utf-8'));
