import java.util.*;
public class Ni
{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
String str=sc.next();
for(int i=str.length()-1;i>=0;i--){
System.out.print(str.charAt(i));
}
}
}
//当直接回车时候程序结束
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
String str=null;
StringBuffer sb=null;
try{
str=bf.readLine();
sb=new StringBuffer(str);
}catch(Exception e){}
while(str.length()!=0)
{
System.out.println(sb.reverse());
try{
str=bf.readLine();
sb=new StringBuffer(str);
}catch(Exception e){}
}
}
}