import java.io.*;public class Reverse
{
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=new String();
str=br.readLine();
while(!str.substring(str.length()-4).equals("tiuq"))
{
str+="\n"+br.readLine();
}

char[] cstr=new char[str.length()];
cstr=str.toCharArray();
for(int i=cstr.length-1;i>=0;i--)
{
System.out.print(cstr[i]);
}
}
}/*测试数据:
abcde
anihC
tiuq
*/