import java.util.Scanner;

/**
 * HJ106 字符逆序 - 简单
 */
public class HJ106 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String str = sc.nextLine();
            StringBuilder sb = new StringBuilder(str);
            sb.reverse();
            System.out.println(sb);
        }
        sc.close();
    }

}