#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &x, T y) {
  x = x ^ ((x ^ y) & -(x < y));
}
template <class T>
inline void umin(T &x, T y) {
  x = y ^ ((x ^ y) & -(x < y));
}
const int N = 2e5, B = (1 << 30);
int n, a[N];
map<int, int> m;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1, x; i <= n; i++) cin >> x, m[a[i]] = x;
  for (int i = 1; i <= n; i++) cout << m[i] << " ";
  return !1;
}
