#include <bits/stdc++.h>
using namespace std;
const int maxn = 110000;
int a[maxn], b[maxn], c[maxn], p[maxn];
;
int n;
int main() {
  cin >> 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++) p[c[c[b[i]]]] = i;
  for (int i = 1; i <= n; i++) printf("%d ", p[i]);
  printf("\n");
}
