#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  int n;
  int p[100001];
  int tmp[100001];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", tmp + i);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", p + tmp[i] - 1);
  }
  for (int i = 0; i < n; i++) {
    if (i != 0) printf(" ");
    printf("%d", p[i]);
  }
  return 0;
}
