#include <bits/stdc++.h>
using namespace std;
bool flag = true;
const long long int N = 1e5 + 10;
const long long int inf = 998244353;
void solve() {
  int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n], b[n];
    map<int, int> mp1, mp2;
    for (int i = 0; i < n; i++) cin >> a[i], mp1[a[i]] = i + 1;
    for (int i = 0; i < n; i++) {
      cin >> b[i];
      cout << mp1[b[i]] << " ";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long int T = 1, te = 1;
  while (T--) {
    solve();
  }
  return 0;
}
