import java.io.*; 
  
public class Password 
{ 
  static void getPassword() throws Exception 
  { 
    BufferedReader cin; 
    cin = new BufferedReader(new InputStreamReader(System.in)); 
  
    while (true) 
    { 
      String password; 
      System.out.print("Enter the password: "); 
      password = cin.readLine(); 
      if (password.equals("12345")) break; 
      System.out.print("INVALID. "); 
    } // while 
  } // getPassword 
  
  public static void main(String[] argv) throws Exception 
  { 
    getPassword(); 
    // do stuff... 
  } // main 
} // public class 
