#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010];
int p[100010];
int main(void) {
  int N, i;
  cin >> N;
  for ((i) = 0; (i) < (int)(N); (i)++) {
    scanf("%d", &a[i]);
    a[i]--;
  }
  for ((i) = 0; (i) < (int)(N); (i)++) {
    scanf("%d", &b[i]);
    b[i]--;
  }
  for ((i) = 0; (i) < (int)(N); (i)++) p[a[i]] = b[i];
  for ((i) = 0; (i) < (int)(N); (i)++) {
    printf("%d", p[i] + 1);
    if (i == N - 1)
      printf("\n");
    else
      printf(" ");
  }
  return 0;
}
