public static boolean dfs ( int [ ] [ ] T , int N , int K , int n , int num ) {
  if ( n == 0 ) {
    for ( int k = 0 ;
    k < K ;
    k ++ ) {
      if ( dfs ( T , N , K , n + 1 , T [ n ] [ k ] ) ) {
        return true ;
      }
    }
  }
  else if ( n < N ) {
    for ( int k = 0 ;
    k < K ;
    k ++ ) {
      if ( dfs ( T , N , K , n + 1 , num ^ T [ n ] [ k ] ) ) {
        return true ;
      }
    }
  }
  else {
    if ( num == 0 ) {
      return true ;
    }
  }
  return false ;
}

public static boolean dfs ( int [ ] [ ] T , int N , int K , int n , int num ) { if ( n == 0 ) { for ( int k = 0 ; k < K ; k ++ ) { if ( dfs ( T , N , K , n + 1 , T [ n ] [ k ] ) ) { return true ; } } } else if ( n < N ) { for ( int k = 0 ; k < K ; k ++ ) { if ( dfs ( T , N , K , n + 1 , num ^ T [ n ] [ k ] ) ) { return true ; } } } else { if ( num == 0 ) { return true ; } } return false ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (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: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))))) consequence: (block (return_statement (true))))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (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: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))))) consequence: (block (return_statement (true))))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (return_statement (true))))))) (return_statement (false))))