import java.util.*;
public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    }

    static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    }

    static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    }
} Main static Scanner kbd = new Scanner(System.in); kbd new Scanner(System.in) public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    } main {
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    } while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	} kbd.hasNext() kbd.hasNext kbd {
	    String s = kbd.next();
	    solve(s);
	} String s = kbd.next(); s kbd.next() kbd.next kbd solve(s) solve s String[] args args static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    } solve {
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    } String[] re = new String[s.length()]; re new String[s.length()] s.length() s.length s int i; i for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	} i=0; i=0 i 0 i<s.length() i s.length() s.length s i++ i++ i {
	    re[i] = s.substring(i, i+1);
	} {
	    re[i] = s.substring(i, i+1);
	} re[i] = s.substring(i, i+1) re[i] re i s.substring(i, i+1) s.substring s i i+1 i 1 String ans = ""; ans "" for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	} i=re.length-1; i=re.length-1 i re.length-1 re.length re re.length 1 i>=0 i 0 i-- i-- i {
	    ans += re[i];
	} {
	    ans += re[i];
	} ans += re[i] ans re[i] re i System.out.println(ans) System.out.println System.out System System.out ans String s s public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    }

    static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    }
} public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    }

    static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    }
} Main
import java.util.*;
public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    String s = kbd.next();
	    solve(s);
	}
    }

    static void solve(String s){
	String[] re = new String[s.length()];
	int i;
	for(i=0; i<s.length(); i++){
	    re[i] = s.substring(i, i+1);
	}
	String ans = "";
	for(i=re.length-1; i>=0; i--){
	    ans += re[i];
	}
	System.out.println(ans);
    }
}