import java.io.*;

class text
{
	String error = "The required file not found.";
	public static boolean compare(String line)
	{
	  
	  char symbols[] = new char[256];
	  char reversed_sym[] = new char[256];
	  boolean same= true;
	  int count = line.length() - 1;
	  int i = 0;
	  
	  symbols = line.toCharArray();
	  for (int r= count; r>= 0; r--, i++)
	  {
	  	same = (same && (symbols[r] == symbols[i]));
	  }
	  
	  return same;	
	}
	
	public static void main(String[] arg) throws IOException	
	{
		{
			FileReader infile = new FileReader("text.txt");
	    } catch ()
		throw new FileNotFoundException("Error");
		BufferedReader input= new BufferedReader(infile);
        String line;
        boolean same;
		while ((line = input.readLine()) != null)
		{
			same = compare(line);
			if (same)
			   System.out.println(line);
		}
			 
	
	}
	
	
	
	
	
}
/*aaaab jjj
jjj baaaa



aabaa
aabaa*/