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