#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n = 0;
  cin >> n;
  vector<pair<int, int> > array(n);
  for (int i = 0; i < n; ++i) {
    cin >> array[i].first;
    --array[i].first;
  }
  for (int i = 0; i < n; ++i) {
    cin >> array[i].second;
    --array[i].second;
  }
  sort(array.begin(), array.end());
  for (int i = 0; i < n; ++i) {
    cout << (array[i].second + 1) << " ";
  }
  return 0;
}
