static void createGraph ( int n , Scanner sc ) {
  visited = new boolean [ n + 1 ] ;
  list = new Vector [ n + 1 ] ;
  color = new int [ n + 1 ] ;
  for ( int i = 0 ;
  i <= n ;
  i ++ ) list [ i ] = new Vector < > ( ) ;
  for ( int i = 2 ;
  i <= n ;
  i ++ ) addEdges ( i , sc . nextInt ( ) ) ;
}

static void createGraph ( int n , Scanner sc ) { visited = new boolean [ n + 1 ] ; list = new Vector [ n + 1 ] ; color = new int [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) list [ i ] = new Vector < > ( ) ; for ( int i = 2 ; i <= n ; i ++ ) addEdges ( i , sc . nextInt ( ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (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: (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list))))) (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: (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))))