import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	}

} Main public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	} main {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str str reverse; reverse int num; num while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		} reverse = "" reverse "" num = str.length() num str.length() str.length str char[] word = new char[num]; word new char[num] num for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
				word[i] = str.charAt(i);
			} {
				word[i] = str.charAt(i);
			} word[i] = str.charAt(i) word[i] word i str.charAt(i) str.charAt str i for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			} int i = num-1; int i = num-1; i num-1 num 1 i >=0 i 0 i-- i-- i {
				reverse = reverse + word[i];
			} {
				reverse = reverse + word[i];
			} reverse = reverse + word[i] reverse reverse + word[i] reverse word[i] word i System.out.println(reverse) System.out.println System.out System System.out reverse String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		//??????????????°?¨????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str, reverse;
		int num;

		while ((str = br.readLine()) != null){
			//????????????????????°????????????
			reverse = "";
			num = str.length();
			char[] word = new char[num];
			//??????
			for (int i = 0; i < num; i++) {
				word[i] = str.charAt(i);
			}
			//?????????
			for (int i = num-1; i >=0; i--) {
				reverse = reverse + word[i];
			}
			//??????
			System.out.println(reverse);
		}

	}

}