import java.io.*;
import hsa.Console;

// The "Rhombus" class.
public class Problem4
{
    public static void main (String[] args) throws IOException
    {

	// Open up the input and output file for IO purpose
	FileReader inFile = new FileReader ("DATA4.txt");
	FileWriter outFile = new FileWriter ("OUT4.txt");

	// Link the input and output file for
	BufferedReader in = new BufferedReader (inFile);
	BufferedWriter out = new BufferedWriter (outFile);

	// String e;
	String line;

	// Keep reading as long as not end of file (eof)
	while ((line = in.readLine ()) != null)
	{
	    int symbol = 0;
	    int length = line.length ();
	    int count = 0;
	    boolean found = false;
	    while (found == false)
	    {
		if (count == symbol)
		{
		    count = count + 1;
		}
		char compare = line.charAt (symbol);
		char compare2 = line.charAt (count);
		if (compare == compare2)
		{
		    symbol = symbol + 1;
		    count = 0;

		}
		else
		{
		    count++;
		    if (count == length)
		    {
			String result = "" + compare;
			System.out.println (result);
			found = true;
		    }
		}
	    }


	}


	out.flush ();
	out.close ();
    }




}







// main method
// End of Class



