#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr1[100002], arr2[100002], arr3[100002];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr1[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> arr2[i];
  }
  for (int i = 1; i <= n; i++) {
    arr3[arr1[i]] = arr2[i];
  }
  for (int i = 1; i <= n; i++) {
    cout << arr3[i];
    if (i < n)
      cout << " ";
    else
      cout << "\n";
  }
}
