import java.util.; import java.io.; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine())!=null){ StringBuilder s = new StringBuilder(); int len = str.length(); for(int i = len -1;i >= 0;i --){ s = s.append(str.charAt(i)); } System.out.println(String.valueOf(s)); } } }