#include <bits/stdc++.h>
using namespace std;
long a[100001], p[100001];
long n;
int main() {
  scanf("%ld", &n);
  for (long i = 1; i <= n; i++) {
    int x;
    scanf("%ld", &x);
    a[x] = i;
  }
  for (long i = 1; i <= n; i++) {
    int x;
    scanf("%ld", &x);
    p[i] = a[x];
  }
  for (long i = 1; i <= n; i++) printf("%ld ", p[i]);
  return 0;
}
