import java.util.Scanner; import java.io.PrintStream; public class Reverse { public static void main(String[] args) { Scanner scanner = new Scanner(System.in,"UTF8"); String S = scanner.nextLine(); StringBuilder sb = new StringBuilder(S); sb.reverse().toString(); try{ PrintStream out = new PrintStream(System.out, true, "UTF8"); out.println(sb); scanner.close(); }catch(Exception e){} } }