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