import java.util.*;

public class Main {
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	}
} Main public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	} main {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s s r = ""; r "" s = sc.next() s sc.next() sc.next sc for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        } int i=s.length()-1; int i=s.length()-1; i s.length()-1 s.length() s.length s 1 i>=0 i 0 i-- i-- i {
        	 r += String.valueOf(s.charAt(i));
        } {
        	 r += String.valueOf(s.charAt(i));
        } r += String.valueOf(s.charAt(i)) r String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	}
} public class Main {
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {

		//input
		Scanner sc = new Scanner(System.in);
		String s,r = "";
		s = sc.next();
        for(int i=s.length()-1;i>=0;i--){
        	 r += String.valueOf(s.charAt(i));
        }
		
         //output
         System.out.println(r);
	}
}