#include <bits/stdc++.h>
using namespace std;
const int MAX = 100 * 1000 + 10;
int a[MAX + 10];
int b[MAX + 10];
int p[MAX + 10];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  for (int i = 0; i < n; i++) p[a[i] - 1] = b[i] - 1;
  for (int i = 0; i < n; i++) cout << p[i] + 1 << " ";
  cout << endl;
  return 0;
}
