public static void main ( String [ ] args ) throws IOException {
  BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
  String Response ;
  int numnos = 0 ;
  try {
    for ( int i = 0 ;
    i <= 9 ;
    i ++ ) {
      System . out . println ( i ) ;
      Response = br . readLine ( ) ;
      if ( Response . equals ( "cool" ) || Response . equals ( "great!" ) || Response . equals ( "not bad" ) || Response . equals ( "don't think so" ) || Response . equals ( "don't touch me!" ) ) {
        System . out . println ( "normal" ) ;
        break ;
      }
      else if ( Response . equals ( "terrible" ) || Response . equals ( "worse" ) || Response . equals ( "no way" ) || Response . equals ( "don't even" ) || Response . equals ( "are you serious?" ) || Response . equals ( "go die in a hole" ) ) {
        System . out . println ( "grumpy" ) ;
        break ;
      }
      if ( Response . equals ( "no" ) ) {
        if ( ++ numnos > 3 ) {
          System . out . println ( "normal" ) ;
        }
      }
    }
  }
  catch ( Exception e ) {
    e . printStackTrace ( ) ;
  }
}

public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String Response ; int numnos = 0 ; try { for ( int i = 0 ; i <= 9 ; i ++ ) { System . out . println ( i ) ; Response = br . readLine ( ) ; if ( Response . equals ( " cool " ) || Response . equals ( " great ! " ) || Response . equals ( " not ▁ bad " ) || Response . equals ( " don ' t ▁ think ▁ so " ) || Response . equals ( " don ' t ▁ touch ▁ me ! " ) ) { System . out . println ( " normal " ) ; break ; } else if ( Response . equals ( " terrible " ) || Response . equals ( " worse " ) || Response . equals ( " no ▁ way " ) || Response . equals ( " don ' t ▁ even " ) || Response . equals ( " are ▁ you ▁ serious ? " ) || Response . equals ( " go ▁ die ▁ in ▁ a ▁ hole " ) ) { System . out . println ( " grumpy " ) ; break ; } if ( Response . equals ( " no " ) ) { if ( ++ numnos > 3 ) { System . out . println ( " normal " ) ; } } } } catch ( Exception e ) { e . printStackTrace ( ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (try_statement body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (break_statement)) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (break_statement)))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))))