#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (auto &it : a) cin >> it;
  for (auto &it : b) cin >> it;
  vector<int> res(n + 1);
  for (int i = 0; i < n; i++) res[a[i]] = b[i];
  for (int i = 1; i <= n; i++) cout << res[i] << " ";
}
