#include <bits/stdc++.h>
using namespace std;
bool gt(long double a, long double b) { return a > b + 1e-9; }
const int MAXN = 101 * 1000;
int n, a[MAXN], b[MAXN];
map<int, int> mp;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (register int i = (0); i < (int)(n); ++i) cin >> a[i];
  for (register int i = (0); i < (int)(n); ++i) cin >> b[i];
  for (register int i = (0); i < (int)(n); ++i) mp[a[i]] = i + 1;
  for (register int i = (0); i < (int)(n); ++i) cout << mp[b[i]] << " ";
  cout << endl;
  return 0;
}
