#include <bits/stdc++.h>
const double eps = 1e-9;
const int int_inf = 2000000000;
const long long i64_inf = 1000000000000000000LL;
const double pi = acos(-1.0);
using namespace std;
int a[1000000];
int b[1000000];
int p[1000000];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < (int)n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < (int)n; i++) scanf("%d", &b[i]);
  for (int i = 0; i < (int)n; i++) p[a[i]] = b[i];
  for (int i = 1; i <= n; i++) printf("%d ", p[i]);
  return 0;
}
