#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 2e5;
int n, x, y;
int a[N], b[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    a[x] = i;
  }
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= n; i++) cout << a[b[i]] << " ";
  return 0;
}
