#include <bits/stdc++.h>
using namespace std;
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
const int N = 212345;
int a[N];
int b[N];
int ind[N];
int main() {
  int n, m, i, j;
  n = read();
  for (i = 1; i <= n; i++) a[i] = read(), ind[a[i]] = i;
  for (i = 1; i <= n; i++) b[i] = read();
  for (i = 1; i <= n; i++) {
    cout << ind[b[i]] << " ";
  }
}
