#include <bits/stdc++.h>
using namespace std;
const int N = 1e9 + 7;
const int maxn = 1e5 + 10;
int a[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  while (cin >> n) {
    int x;
    for (int i = 1; i <= n; i++) {
      cin >> x;
      a[x] = i;
    }
    for (int i = 1; i <= n; i++) {
      cin >> x;
      cout << a[x];
      if (i < n) cout << " ";
    }
    cout << "\n";
  }
  return 0;
}
