#include <bits/stdc++.h>
int main() {
  int num_students;
  std::cin >> num_students;
  std::vector<int> third_round, fourth_round;
  std::map<int, int> friend_map;
  for (int i = 0; i < num_students; i++) {
    int n;
    std::cin >> n;
    third_round.push_back(n);
  }
  for (int i = 0; i < num_students; i++) {
    int n;
    std::cin >> n;
    fourth_round.push_back(n);
  }
  for (int i = 0; i < third_round.size(); i++)
    friend_map[third_round[i]] = fourth_round[i];
  for (int i = 1; i <= num_students; i++) std::cout << friend_map[i] << " ";
  std::cout << std::endl;
  return 0;
}
