#include <bits/stdc++.h>
using namespace std;
long long per[1000002];
long long power(long long x, long long y) {
  long long res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long ans[100005];
int main() {
  long long n;
  cin >> n;
  long long arr1[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr1[i];
  }
  long long arr2[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr2[i];
  }
  for (long long i = 0; i < n; i++) {
    ans[arr1[i]] = arr2[i];
  }
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
