import java.io.*; 
  
public class CrossTheRoad
{ 
  public static void main(String[] argv) throws Exception 
  { 
    BufferedReader cin; 
    cin = new BufferedReader(new InputStreamReader(System.in)); 

    System.out.println("Approach the curb.");
    while (true) 
    { 
      char answer; 
      System.out.print("Look both ways. Is it clear [Y/N]? "); 

      answer = cin.readLine().charAt(0); 
  
      if (answer == 'Y' || answer == 'y') break; 
    } // while 

    System.out.println("It's safe to cross");
  } // main
} // public class
