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