#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> b(n);
  vector<int> c(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) cin >> b[i];
  for (int i = 0; i < n; ++i) {
    c[a[i] - 1] = b[i];
  }
  for (int i = 0; i < n; ++i) cout << c[i] << " ";
  cout << endl;
  return 0;
}
