#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
int p[100000];
int q[100000];
int res[100000];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  for (int i = 0; i < n; i++) scanf("%d", &q[i]);
  for (int i = 0; i < n; i++) res[p[i] - 1] = q[i];
  for (int i = 0; i < n; i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}
