#include <bits/stdc++.h>
#pragma hdrstop
#pragma argsused
using namespace std;
int main(int argc, char* argv[]) {
  int n;
  cin >> n;
  vector<int> a(n + 1), b(n + 1), p(n + 1);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
    p[a[i]] = b[i];
  }
  for (int i = 1; i <= n; ++i) cout << p[i] << " ";
  return 0;
}
