#include <bits/stdc++.h>
using namespace std;
int sum[5010];
int tot[5010];
bool upd[5010];
int ma;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int a[n + 1];
  int b[n + 1];
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x, a[x] = i;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x, b[i] = a[x];
  }
  for (int i = 1; i <= n; i++) cout << b[i] << " ";
  return 0;
}
