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