#include <bits/stdc++.h>
static const int INF = std::numeric_limits<int>::max();
int main() {
  int n;
  std::cin >> n;
  std::vector<int> a(n + 1), b(n + 1);
  for (int i = 1; i <= n; ++i) {
    std::cin >> a[i];
  }
  for (int i = 1; i <= n; ++i) {
    std::cin >> b[i];
  }
  std::vector<int> res(n + 1);
  for (int i = 1; i <= n; ++i) {
    res[a[i]] = b[i];
  }
  for (int i = 1; i <= n; ++i) {
    std::cout << res[i] << " ";
  }
  std::cout << std::endl;
}
