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