#include <bits/stdc++.h>
using namespace std;
int n;
int a[100100], b[100100];
int id[100100], p[100100];
int main() {
  int T = 1;
  while (T--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      id[a[i]] = i;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
    }
    for (int i = 1; i <= n; i++) {
      int x = b[i];
      int op = id[x];
      p[i] = op;
    }
    for (int i = 1; i <= n; i++) printf("%d ", p[i]);
  }
}
