import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str = in.next();
		StringBuilder rev = new StringBuilder("");
		in.close();
		for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		}
		System.out.println(rev.toString());
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str = in.next();
		StringBuilder rev = new StringBuilder("");
		in.close();
		for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		}
		System.out.println(rev.toString());
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str = in.next();
		StringBuilder rev = new StringBuilder("");
		in.close();
		for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		}
		System.out.println(rev.toString());
	} main {
		Scanner in = new Scanner(System.in);
		String str = in.next();
		StringBuilder rev = new StringBuilder("");
		in.close();
		for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		}
		System.out.println(rev.toString());
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String str = in.next(); str in.next() in.next in StringBuilder rev = new StringBuilder(""); rev new StringBuilder("") in.close() in.close in for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		} 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 {
			rev.append(str.charAt(i));
		} {
			rev.append(str.charAt(i));
		} rev.append(str.charAt(i)) rev.append rev str.charAt(i) str.charAt str i System.out.println(rev.toString()) System.out.println System.out System System.out rev.toString() rev.toString rev String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str = in.next();
		StringBuilder rev = new StringBuilder("");
		in.close();
		for (int i = str.length() - 1; i >= 0; i--) {
			rev.append(str.charAt(i));
		}
		System.out.println(rev.toString());
	}
}