#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, c[100001], i, p;
  bool t = 1;
  cin >> n;
  vector<pair<long int, long int> > a(n + 1);
  vector<pair<long int, long int> > b(n + 1);
  for (i = 1; i <= n; i++) {
    cin >> p;
    a[i] = make_pair(p, i);
  }
  for (i = 1; i <= n; i++) {
    cin >> p;
    b[i] = make_pair(p, i);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  for (i = 1; i <= n; i++) c[b[i].second] = a[i].second;
  for (i = 1; i <= n; i++)
    if (t == 1) {
      t = 0;
      cout << c[i];
    } else
      cout << ' ' << c[i];
  return 0;
}
