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