#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], b[n], p[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    b[i]--;
    p[a[i]] = b[i];
  }
  for (int i = 0; i < n; i++) cout << p[i] + 1 << " ";
  return 0;
}
