#include <bits/stdc++.h>
using namespace std;
int main() {
  int cases, temp, temp2, cs1, cs2;
  map<int, int> numbers, numbers2;
  cin >> cases;
  for (int i = 0; i < cases; i++) {
    cin >> temp;
    numbers[i] = temp;
  }
  for (int i = 0; i < cases; i++) {
    cin >> temp2;
    cs1 = numbers[i];
    numbers2[cs1] = temp2;
  }
  for (map<int, int>::iterator it = numbers2.begin(); it != numbers2.end();
       ++it) {
    cout << it->second << " ";
  }
  cout << endl;
}
