#include <bits/stdc++.h>
using namespace std;
void oneCase() {
  int n;
  cin >> n;
  vector<int> was;
  vector<int> now;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    --a;
    was.push_back(a);
  }
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    --a;
    now.push_back(a);
  }
  vector<int> p(n);
  for (int i = 0; i < n; ++i) {
    p[was[i]] = now[i];
  }
  for (auto& el : p) {
    cout << el + 1 << ' ';
  }
  cout << "\n";
}
int main() {
  int t = 1;
  while (t--) {
    oneCase();
  }
  return 0;
}
