import java.util.*;

public class Main {
      public static void main(String[] args){
          Scanner scanner = new Scanner(System.in);
          while(scanner.hasNext()){
              //方法一:for循环从后往前遍历
              String[] strs = scanner.nextLine().split("");
              for(int i=strs.length-1;i>=0;i--){
                  System.out.print(strs[i]);
              }
              
              //方法二:利用StringBuffer缓冲中的reverse前后倒置的函数
//               StringBuffer strBuffer = new StringBuffer(scanner.nextLine());
//               System.out.print(strBuffer.reverse());
          }
      }
}