#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::deque;
using std::endl;
using std::map;
using std::max;
using std::min;
using std::multiset;
using std::pair;
using std::queue;
using std::set;
using std::sort;
using std::stack;
using std::string;
using std::vector;
int main() {
  int n;
  cin >> n;
  int a[100001] = {
      0,
  };
  int b[100001] = {
      0,
  };
  int p[100001] = {
      0,
  };
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", b + i);
    p[a[i]] = b[i];
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", p[i]);
  }
  return 0;
}
