#include <bits/stdc++.h>
using namespace std;
vector<int> a;
vector<int> b;
vector<int> p;
int main() {
  int n = 0;
  cin >> n;
  a.assign(n, 0);
  b.assign(n, 0);
  p.assign(n, 0);
  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++) {
    p[a[i] - 1] = b[i];
  }
  for (int i = 0; i < n; i++) {
    cout << p[i] << " ";
  }
  return 0;
}
