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