import java.util.*;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	String str = sc.next();

	String rts = "";
	for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	}

	System.out.println(rts);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	String str = sc.next();

	String rts = "";
	for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	}

	System.out.println(rts);
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	String str = sc.next();

	String rts = "";
	for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	}

	System.out.println(rts);
    } main {
	Scanner sc = new Scanner(System.in);

	String str = sc.next();

	String rts = "";
	for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	}

	System.out.println(rts);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String rts = ""; rts "" for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	} int i=str.length()-1; int i=str.length()-1; i str.length()-1 str.length() str.length str 1 i>=0 i 0 i-- i-- i {
	    String s = str.substring(i,i+1);
	    rts += s;
	} {
	    String s = str.substring(i,i+1);
	    rts += s;
	} String s = str.substring(i,i+1); s str.substring(i,i+1) str.substring str i i+1 i 1 rts += s rts s System.out.println(rts) System.out.println System.out System System.out rts String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	String str = sc.next();

	String rts = "";
	for(int i=str.length()-1; i>=0; i--){
	    String s = str.substring(i,i+1);
	    rts += s;
	}

	System.out.println(rts);
    }
}