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