#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    static int a[100005], b[100005], c[100005];
    for (int j = 1; j <= n; j++) {
      scanf("%d", &a[j]);
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
    }
    for (int i = 1; i <= n; i++) {
      c[a[i]] = b[i];
    }
    for (int i = 1; i < n; i++) {
      printf("%d ", c[i]);
    }
    printf("%d\n", c[n]);
  }
}
