static String add ( int [ ] nums , boolean check ) {
  int most = 0 ;
  for ( int i = 0 ;
  i < nums . length ;
  i ++ ) if ( nums [ i ] > nums [ most ] ) most = i ;
  nums [ most ] -- ;
  int sum = 0 ;
  for ( int num : nums ) sum += num ;
  if ( check ) for ( int num : nums ) if ( num > sum / 2 ) {
    nums [ most ] ++ ;
    return "" ;
  }
  return ( char ) ( 'A' + most ) + "" ;
}

static String add ( int [ ] nums , boolean check ) { int most = 0 ; for ( int i = 0 ; i < nums . length ; i ++ ) if ( nums [ i ] > nums [ most ] ) most = i ; nums [ most ] -- ; int sum = 0 ; for ( int num : nums ) sum += num ; if ( check ) for ( int num : nums ) if ( num > sum / 2 ) { nums [ most ] ++ ; return " " ; } return ( char ) ( ' A ' + most ) + " " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (boolean_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (return_statement (string_literal)))))) (return_statement (binary_expression left: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (character_literal) right: (identifier)))) right: (string_literal)))))