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