import java.util.*;
public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}
} import java.util.*; util.* java public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}
} Main public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	} doIt {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		} sc.hasNext() sc.hasNext sc {
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		} System.out.println(new StringBuilder(sc.next()).reverse().toString()) System.out.println System.out System System.out new StringBuilder(sc.next()).reverse().toString() new StringBuilder(sc.next()).reverse().toString new StringBuilder(sc.next()).reverse() new StringBuilder(sc.next()).reverse new StringBuilder(sc.next()) public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	} main {
		Main obj = new Main();
		obj.doIt();
	} Main obj = new Main(); obj new Main() obj.doIt() obj.doIt obj String[] args args public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}
} public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}
} Main
import java.util.*;
public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			System.out.println(new StringBuilder(sc.next()).reverse().toString());
		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();
	}
}