import java.util.Scanner;
import java.lang.StringBuilder;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextLine()) {
System.out.println(myAns(in.nextLine()));
}
}
private static String myAns(String str) {
str = str.toLowerCase();
StringBuilder sb = new StringBuilder(str.length());
for (int i = str.length() - 1; i >= 0; i--) {
sb.append(str.charAt(i));
}
return sb.toString();
}
}