#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> mas(n + 1);
  int curr;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &curr);
    mas[curr] = i;
  }
  scanf("%d", &curr);
  printf("%d", mas[curr]);
  for (int i = 1; i < n; i++) {
    scanf("%d", &curr);
    printf(" %d", mas[curr]);
  }
  printf("\n");
  return 0;
}
