public static void main ( String args [ ] ) {
  Scanner in ;
  PrintStream out ;
  try {
    in = new Scanner ( new FileInputStream ( "in.in" ) ) ;
    out = new PrintStream ( "out.out" ) ;
  }
  catch ( FileNotFoundException e ) {
    in = new Scanner ( new BufferedInputStream ( System . in ) ) ;
    out = System . out ;
  }
  int n = in . nextInt ( ) ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    a [ i ] = in . nextInt ( ) ;
    ia [ i ] = i ;
  }
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    b [ i ] = in . nextInt ( ) ;
    ib [ i ] = i ;
  }
  Arrays . sort ( ia , 0 , n , new MyCom ( ) ) ;
  Arrays . sort ( ib , 0 , n , new YourCom ( ) ) ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    answer [ ib [ i ] ] = a [ ia [ i ] ] ;
  }
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    out . print ( answer [ i ] ) ;
    if ( i + 1 < n ) out . print ( ' ' ) ;
    else out . println ( ) ;
  }
}

public static void main ( String args [ ] ) { Scanner in ; PrintStream out ; try { in = new Scanner ( new FileInputStream ( " in . in " ) ) ; out = new PrintStream ( " out . out " ) ; } catch ( FileNotFoundException e ) { in = new Scanner ( new BufferedInputStream ( System . in ) ) ; out = System . out ; } int n = in . nextInt ( ) ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = in . nextInt ( ) ; ia [ i ] = i ; } for ( int i = 0 ; i < n ; i ++ ) { b [ i ] = in . nextInt ( ) ; ib [ i ] = i ; } Arrays . sort ( ia , 0 , n , new MyCom ( ) ) ; Arrays . sort ( ib , 0 , n , new YourCom ( ) ) ; for ( int i = 0 ; i < n ; i ++ ) { answer [ ib [ i ] ] = a [ ia [ i ] ] ; } for ( int i = 0 ; i < n ; i ++ ) { out . print ( answer [ i ] ) ; if ( i + 1 < n ) out . print ( ' ▁ ' ) ; else out . println ( ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (try_statement body: (block (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal)))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) 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: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))))) (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 (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal) (identifier) (object_creation_expression type: (type_identifier) arguments: (argument_list))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal) (identifier) (object_creation_expression type: (type_identifier) 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: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (array_access array: (identifier) index: (identifier))) right: (array_access array: (identifier) index: (array_access array: (identifier) index: (identifier))))))) (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 (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal)))) alternative: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))))