#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, a[N], b[N], p[N];
int main() {
  if (fopen("180F.in", "r")) freopen("180F.in", "r", stdin);
  scanf("%d\n", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", b + i);
  }
  for (int i = 1; i <= n; i++) {
    p[a[i]] = b[i];
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", p[i]);
  }
}
