#include <bits/stdc++.h>
using namespace std;
void fast_stream() { std::ios_base::sync_with_stdio(0); }
int n;
int a[100001];
int b[100001];
int plc[1000001];
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    plc[a[i]] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    cout << (plc[b[i]]);
    if (i == n - 1)
      cout << endl;
    else
      cout << " ";
  }
}
int main() {
  solve();
  return 0;
}
