#include <bits/stdc++.h>
using namespace std;
int num[100005];
int main() {
  int n;
  while (cin >> n) {
    int i, t;
    for (i = 1; i <= n; ++i) {
      cin >> t;
      num[t] = i;
    }
    for (i = 1; i <= n; ++i) {
      cin >> t;
      if (i != n) {
        cout << num[t] << " ";
      }
    }
    cout << num[t] << endl;
  }
  return 0;
}
