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