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