#include <bits/stdc++.h>
using namespace std;
int a[100100], b[100100];
int pos1[100100], pos2[100100];
int trans[100100];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
    pos1[a[i]] = i;
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    b[i]--;
    pos2[b[i]] = i;
  }
  for (int i = 0; i < n; i++) {
    trans[a[i]] = b[i];
  }
  for (int i = 0; i < n; i++) {
    if (i) cout << ' ';
    cout << trans[i] + 1;
  }
  cout << endl;
}
