#include <bits/stdc++.h>
using namespace std;
int i, n, a[100005], b[100005], rs[100005], where[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> a[i], where[a[i]] = i;
  for (i = 1; i <= n; ++i) cin >> b[i], cout << where[b[i]] << " \n"[i == n];
  return 0;
}
