static int getHonest ( ) {
  int need = B + 1 ;
  LinkedList < Integer > list = new LinkedList < > ( ) ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    if ( list . isEmpty ( ) ) {
      list . push ( i ) ;
    }
    else {
      if ( ask ( list . peek ( ) , i ) ) {
        list . push ( i ) ;
      }
      else {
        list . pop ( ) ;
        need -- ;
      }
    }
    if ( list . size ( ) >= need ) return list . pop ( ) ;
  }
  return - 1 ;
}

static int getHonest ( ) { int need = B + 1 ; LinkedList < Integer > list = new LinkedList < > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { if ( list . isEmpty ( ) ) { list . push ( i ) ; } else { if ( ask ( list . peek ( ) , i ) ) { list . push ( i ) ; } else { list . pop ( ) ; need -- ; } } if ( list . size ( ) >= need ) return list . pop ( ) ; } return - 1 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) (identifier)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (expression_statement (update_expression (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (identifier))) consequence: (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (return_statement (unary_expression operand: (decimal_integer_literal)))))