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