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