import java.util.*;
import java.io.*;
import java.lang.*;

public class texttwist2 

{   
	static Scanner console = new Scanner(System.in);
    public static void main(String[]args)
    {
       int words=3;
       
       char cont='y';
       String[] db = new String[2 + words];
	   
	   db[0]="abcde";	// word to twist
	   db[1]="";      //input
	   
	   
	   
	   db[2]="bad";		// possible ans.. "3" == words
	   db[3]="bed";
	   db[4]="cab";
    	
       int point;
       

   do
   	 {
		point = 0;
		
		System.out.println("The word is: " +db[0]);
   		  
   		do{
   		
   		  
		System.out.println("\nInput a word:");
		db[1] = console.nextLine();

		
		for(int ctr=2;ctr<= words + 1;  ctr++)
		{
			if (db[1].equals(db[ctr]))
			{
			System.out.printf( "One Point!!");
			point++;
			break;
			}
			else if(ctr==words+1)
			{
			System.out.printf( "No Such word!\n");
			}
		}
		
		    try{
		    	
		    	
				    	System.out.println( "\n\nAnother?(Y/N): " );
				    		    
				    	cont=console.nextLine().charAt(0); 
			
					if(cont=='n')
				    {
					 	break;
		    	 	}
				
			}
			catch( StringIndexOutOfBoundsException x){};
		
		} while(point<words);
		
		
				System.out.printf( "\nthe total points you've got is %d:",point );


 				
 				System.out.println( "\nNew  Game?[Y/N]: " );
				cont=console.nextLine().charAt(0); 
												
 				if(cont=='y' )
				 {
				 }
				if(cont=='n')
				{
				 	System.exit(0);
		    	 }
		    		
 		 }
 		
 		while (cont=='y' || cont=='Y');
}
}   