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