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