static void dfs ( int now , long cost , int front ) {
  dist [ now ] = cost ;
  for ( Edge i : list [ now ] ) {
    if ( i . to != front ) {
      dfs ( i . to , i . cost + cost , now ) ;
    }
  }
}

static void dfs ( int now , long cost , int front ) { dist [ now ] = cost ; for ( Edge i : list [ now ] ) { if ( i . to != front ) { dfs ( i . to , i . cost + cost , now ) ; } } }
(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: (integral_type) name: (identifier))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (array_access array: (identifier) index: (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)) (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (identifier)) (identifier))))))))))