#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 20;
int n, p[N], a[N], b[N];
int main() {
  scanf("%d", &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]);
  return 0;
}
