static void dfs ( int i , int n , Point [ ] p ) {
  vis [ i ] = true ;
  for ( int j = 0 ;
  j < n ;
  j ++ ) {
    if ( ! vis [ j ] ) {
      if ( p [ i ] . x == p [ j ] . x || p [ i ] . y == p [ j ] . y ) {
        dfs ( j , n , p ) ;
      }
    }
  }
}

static void dfs ( int i , int n , Point [ ] p ) { vis [ i ] = true ; for ( int j = 0 ; j < n ; j ++ ) { if ( ! vis [ j ] ) { if ( p [ i ] . x == p [ j ] . x || p [ i ] . y == p [ j ] . y ) { dfs ( j , n , p ) ; } } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (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 (unary_expression operand: (array_access array: (identifier) index: (identifier)))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (binary_expression left: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))))))))))