#include <bits/stdc++.h>
using namespace std;
long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const long long maxn = 1e6 + 10;
long long a[maxn], b[maxn], p[maxn], where[maxn];
int32_t main() {
  long long n = in();
  for (long long i = 0; i < n; i++) {
    a[i] = in();
    where[a[i]] = i;
  }
  for (long long i = 0; i < n; i++) {
    b[i] = in();
    cout << where[b[i]] + 1 << " ";
  }
}
