#include <bits/stdc++.h>
using namespace std;
int n;
int poza[1000005], pozb[1000005], sol[1000005], b[1000005], a[1000005];
inline int Pow_Log(int x, int p) {
  int sol = 1;
  while (p) {
    if (p & 1) {
      sol = (1LL * sol * x) % 1000000007;
      --p;
    }
    p >>= 1;
    x = (1LL * x * x) % 1000000007;
  }
  return sol;
}
int main() {
  int i, j, x;
  cin.sync_with_stdio(0);
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> a[i];
  for (i = 1; i <= n; ++i) {
    cin >> x;
    b[i] = x;
  }
  for (i = 1; i <= n; ++i) sol[a[i]] = b[i];
  for (i = 1; i <= n; ++i) cout << sol[i] << " ";
  return 0;
}
