#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int to[MAXN], a[MAXN], b[MAXN];
int main() {
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      to[a[i]] = b[i];
    }
    for (int i = 1; i <= n; i++) printf("%d ", to[i]);
    puts("");
  }
  return 0;
}
