#include <bits/stdc++.h>
using namespace std;
const int MXN = 1e5 + 1;
int n;
int a[MXN], b[MXN], p[MXN];
int main() {
  cin >> n;
  for (int i = 1, x; i <= n; i++) {
    cin >> x;
    a[x] = i;
  }
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= n; i++) p[i] = a[b[i]];
  for (int i = 1; i <= n; i++) cout << p[i] << ' ';
  return 0;
}
