#include <bits/stdc++.h>
using namespace std;
int m[100001], M[100001];
int main(int argc, char *argv[]) {
  int n, i, x;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> x;
    m[x] = i;
  }
  for (i = 1; i <= n; i++) {
    cin >> x;
    M[i] = m[x];
  }
  cout << M[1];
  for (i = 2; i <= n; i++) cout << ' ' << M[i];
  return EXIT_SUCCESS;
}
