import java.io.*;

public class StringComparisonDemo
{
	private static BufferedReader stdin = 
		new BufferedReader( new InputStreamReader( System.in ) );
        
	public static void main (String [] args) throws IOException
	{
		//prompt user for the first word
		System.out.print("Please enter your first word: ");
		String wordOne = stdin.readLine();
		
		//prompt user for the second word
		System.out.print("Please enter your second word: ");
		String wordTwo = stdin.readLine();
		
		//the boolean == operator does not compare the equality of objects
		//but rather, it compares the equality of the references (i.e. if the
		//references both point to the same object
		if (wordOne == wordTwo)
		{
			System.out.println("WORDS ARE THE SAME!!!");
		}
		else
		{
			System.out.println("WORDS ARE DIFFERENT!!!");
		}
	}
}