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