/*
* Copyright (c) 2004 Your Corporation. All Rights Reserved.
*/
/**
* Created by IntelliJ IDEA.
* User: Jason Ying
* Date: 2004-9-13
* Time: 19:42:53
* To change this template use File | Settings | File Templates.
*/
import java.io.*;
public class Reversed {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
for( ; ; ) {
System.out.print("Please input line:");
String line = in.readLine();
if(line.equals("tiuq"))
break;
else {
try {
for(int i = line.length() - 1; i >= 0; i--) {
System.out.print(line.charAt(i));
}
System.out.println();
}
catch(Exception e) {
System.out.println("Invalid Input");
}
}
}
}
}