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

class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

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

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		}
	}
} Main public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		}
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		}
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		} (str=br.readLine())!=null (str=br.readLine()) str br.readLine() br.readLine br null {
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		} StringBuilder sb =new StringBuilder(); sb new StringBuilder() for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			} 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 {
				sb.append(str.substring(i, i+1));
			} {
				sb.append(str.substring(i, i+1));
			} sb.append(str.substring(i, i+1)) sb.append sb str.substring(i, i+1) str.substring str i i+1 i 1 System.out.println(sb) System.out.println System.out System System.out sb String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main
{

	public static void main(String[] args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str;
		while((str=br.readLine())!=null)
		{
			StringBuilder sb =new StringBuilder();
			for(int i=str.length()-1;i>=0;i--)
			{
				sb.append(str.substring(i, i+1));
			}
			System.out.println(sb);

		}
	}
}