#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void smn(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline void smx(T &a, const T &b) {
  if (b > a) a = b;
}
template <class T>
inline T rev(const T &a) {
  T _ = a;
  reverse(_.begin(), _.end());
  return _;
}
const double eps = 1e-9;
const long double leps = 1e-14;
const int MN = 1000 * 100 + 1000;
pair<int, int> l1[MN], l2[MN];
int p[MN];
int n, a;
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    l1[i] = pair<int, int>(a, i);
  }
  for (int i = 0; i < n; i++) {
    cin >> a;
    l2[i] = pair<int, int>(a, i);
  }
  sort(l1, l1 + n);
  sort(l2, l2 + n);
  for (int i = 0; i < n; i++) p[l2[i].second] = l1[i].second;
  for (int i = 0; i < n; i++) cout << p[i] + 1 << " ";
  cout << '\n';
  return 0;
}
