#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i, j;
  int arr1[n], arr2[n], p[n];
  for (i = 1; i <= n; i++) cin >> arr1[i];
  for (i = 1; i <= n; i++) cin >> arr2[i];
  for (i = 1; i <= n; i++) p[arr1[i]] = arr2[i];
  for (i = 1; i <= n; i++) cout << p[i] << " ";
  return 0;
}
