#include <bits/stdc++.h>
const int maxn = 1e5 + 5;
int n;
int 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[a[i]] = i;
  for (int i = 1; i <= n; i++) d[i] = c[b[i]];
  for (int i = 1; i <= n; i++) printf("%d ", d[i]);
  return 0;
}
