import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	} main {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayDeque<String> ans = new ArrayDeque<String>(); ans new ArrayDeque<String>() while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		} sc.hasNext() sc.hasNext sc {
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		} String s = sc.next(); s sc.next() sc.next sc StringBuffer t = new StringBuffer(s); t new StringBuffer(s) t.reverse() t.reverse t ans.push(t.toString()) ans.push ans t.toString() t.toString t int num = ans.size(); num ans.size() ans.size ans for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		} int i=0; int i=0; i 0 i<num i num i++ i++ i {
			System.out.println(ans.pollLast());
		} {
			System.out.println(ans.pollLast());
		} System.out.println(ans.pollLast()) System.out.println System.out System System.out ans.pollLast() ans.pollLast ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<String> ans = new ArrayDeque<String>();

		while(sc.hasNext()){
			String s = sc.next();
			StringBuffer t = new StringBuffer(s);
			t.reverse();
			ans.push(t.toString());
		}
		int num = ans.size();
		for(int i=0;i<num;i++){
			System.out.println(ans.pollLast());
		}
	}
}