#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double eps = 1e-8;
const int nm = 300005;
int n, k, m, t;
long long res;
int a[nm];
int b[nm], c[nm];
int main() {
  int i, j, x, y, z, w;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
  }
  for (i = 1; i <= n; i++) {
    c[a[i]] = b[i];
  }
  for (i = 1; i <= n; i++) printf("%d ", c[i]);
  return 0;
}
