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