#include <bits/stdc++.h>
int p[100005], a[100005], b[100005];
void solve() {
  int n, i;
  while (scanf("%d", &n) == 1) {
    for (i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      p[a[i]] = b[i];
    }
    for (i = 1; i <= n - 1; i++) printf("%d ", p[i]);
    printf("%d\n", p[n]);
  }
  return;
}
int main() {
  solve();
  return 0;
}
