import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Main{
    public static void main(String[] a) throws Exception{
    	ArrayList<String> lst = new ArrayList<String>();
    	
    	Scanner scan = new Scanner(System.in);
    	
    	StringBuffer a1 = new StringBuffer(scan.next());
        System.out.println(a1.reverse());
    }
} import java.io.*; io.* java import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] a) throws Exception{
    	ArrayList<String> lst = new ArrayList<String>();
    	
    	Scanner scan = new Scanner(System.in);
    	
    	StringBuffer a1 = new StringBuffer(scan.next());
        System.out.println(a1.reverse());
    }
} Main public static void main(String[] a) throws Exception{
    	ArrayList<String> lst = new ArrayList<String>();
    	
    	Scanner scan = new Scanner(System.in);
    	
    	StringBuffer a1 = new StringBuffer(scan.next());
        System.out.println(a1.reverse());
    } main {
    	ArrayList<String> lst = new ArrayList<String>();
    	
    	Scanner scan = new Scanner(System.in);
    	
    	StringBuffer a1 = new StringBuffer(scan.next());
        System.out.println(a1.reverse());
    } ArrayList<String> lst = new ArrayList<String>(); lst new ArrayList<String>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuffer a1 = new StringBuffer(scan.next()); a1 new StringBuffer(scan.next()) System.out.println(a1.reverse()) System.out.println System.out System System.out a1.reverse() a1.reverse a1 String[] a a
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Main{
    public static void main(String[] a) throws Exception{
    	ArrayList<String> lst = new ArrayList<String>();
    	
    	Scanner scan = new Scanner(System.in);
    	
    	StringBuffer a1 = new StringBuffer(scan.next());
        System.out.println(a1.reverse());
    }
}