static void maxLengthArr ( int x , int y ) {
  boolean [ ] ex = new boolean [ ( 1 << x ) ] ;
  ex [ 0 ] = true ;
  Vector < Integer > pre = new Vector < Integer > ( ) ;
  pre . add ( 0 ) ;
  for ( int i = 1 ;
  i < ( 1 << x ) ;
  i ++ ) {
    if ( ex [ i ^ y ] ) continue ;
    pre . add ( i ) ;
    ex [ i ] = true ;
  }
  if ( pre . size ( ) == 1 ) {
    System . out . print ( "-1" ) ;
    return ;
  }
  for ( int i = 1 ;
  i < pre . size ( ) ;
  i ++ ) System . out . print ( ( pre . get ( i ) ^ pre . get ( i - 1 ) ) + " " ) ;
}

static void maxLengthArr ( int x , int y ) { boolean [ ] ex = new boolean [ ( 1 << x ) ] ; ex [ 0 ] = true ; Vector < Integer > pre = new Vector < Integer > ( ) ; pre . add ( 0 ) ; for ( int i = 1 ; i < ( 1 << x ) ; i ++ ) { if ( ex [ i ^ y ] ) continue ; pre . add ( i ) ; ex [ i ] = true ; } if ( pre . size ( ) == 1 ) { System . out . print ( " - 1" ) ; return ; } for ( int i = 1 ; i < pre . size ( ) ; i ++ ) System . out . print ( ( pre . get ( i ) ^ pre . get ( i - 1 ) ) + " ▁ " ) ; }
(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))) body: (block (local_variable_declaration type: (array_type element: (boolean_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (true))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier)))) consequence: (continue_statement)) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))))) right: (string_literal))))))))