#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
struct STzb {
  int data, index;
};
STzb tzb[MAXN];
int n;
inline bool cmp(const STzb &a, const STzb &b) { return a.data < b.data; }
int binarySearch(int l, int r, const int &k) {
  while (l <= r) {
    int m = (l + r) >> 1;
    (tzb[m].data <= k) ? l = m + 1 : r = m - 1;
  }
  return r;
}
void init(void) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> tzb[i].data;
    tzb[i].index = i + 1;
  }
}
void solve(void) {
  sort(tzb, tzb + n, cmp);
  int x;
  cin >> x;
  cout << tzb[binarySearch(0, n - 1, x)].index;
  for (int i = 1; i < n; i++) {
    cin >> x;
    cout << ' ' << tzb[binarySearch(0, n - 1, x)].index;
  }
  cout << endl;
}
int main(void) {
  ios::sync_with_stdio(false);
  init();
  solve();
  return 0;
}
