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