static void dfs ( int i , boolean [ ] vis ) {
  vis [ i ] = true ;
  black [ i ] = white [ i ] = 1 ;
  for ( int w : map [ i ] ) {
    if ( vis [ w ] ) continue ;
    dfs ( w , vis ) ;
    white [ i ] = white [ i ] * ( white [ w ] + black [ w ] ) % mod ;
    black [ i ] = black [ i ] * white [ w ] % mod ;
  }
}

static void dfs ( int i , boolean [ ] vis ) { vis [ i ] = true ; black [ i ] = white [ i ] = 1 ; for ( int w : map [ i ] ) { if ( vis [ w ] ) continue ; dfs ( w , vis ) ; white [ i ] = white [ i ] * ( white [ w ] + black [ w ] ) % mod ; black [ i ] = black [ i ] * white [ w ] % mod ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (array_type element: (boolean_type) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (array_access array: (identifier) index: (identifier)) body: (block (if_statement condition: (parenthesized_expression (array_access array: (identifier) index: (identifier))) consequence: (continue_statement)) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))))) right: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))) right: (identifier))))))))