#include <bits/stdc++.h>
using namespace std;
const double EPS = 1E-9;
const int INF = 1000000000;
const long long INF64 = (long long)1E18;
const double PI = 3.1415926535897932384626433832795;
int main() {
  long long i, n, j, *a = new long long[200000], *b = new long long[200000],
                     *p = new long long[200000], *c = new long long[200000];
  memset(c, 0, 200000);
  cin >> n;
  for (i = 0; i < n; ++i) p[i] = -1;
  for (i = 0; i < n; ++i) cin >> a[i];
  for (i = 0; i < n; ++i) cin >> b[i];
  for (i = 0; i < n; ++i) {
    p[a[i] - 1] = b[i];
  }
  for (i = 0; i < n; ++i) {
    cout << p[i] << " ";
  }
  return 0;
}
