#include <bits/stdc++.h>
using namespace std;
int data[100001];
int note[100001];
int main() {
  int n;
  cin >> n;
  for (int i(1); i <= n; ++i) {
    cin >> data[i];
  }
  int temp;
  for (int i(1); i <= n; ++i) {
    cin >> temp;
    note[data[i]] = temp;
  }
  cout << note[1];
  for (int i(2); i <= n; ++i) {
    cout << " " << note[i];
  }
  cout << endl;
  return 0;
}
