#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    vector<int> a(n), b(n);
    for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
    for (int i = 0; i < n; ++i) scanf("%d", &b[i]);
    vector<int> p(n + 1);
    for (int i = 0; i < n; ++i) p[a[i]] = b[i];
    for (int i = 1; i < n; ++i) cout << p[i] << " ";
    cout << p[n] << endl;
  }
  return 0;
}
