#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int n;
int a[maxn];
int b[maxn];
int p[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int mask;
    cin >> mask;
    a[mask] = i;
  }
  for (int i = 1; i <= n; ++i) {
    int mask;
    cin >> mask;
    b[mask] = i;
  }
  for (int i = 1; i <= n; ++i) p[b[i]] = a[i];
  for (int i = 1; i <= n; ++i) cout << p[i] << " ";
  cout << endl;
  return 0;
}
