#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int MAXN = 100000;
int N;
int SecondDay[MAXN], ThirdDay[MAXN], Answer[MAXN];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &SecondDay[i]);
    SecondDay[i]--;
  }
  for (int i = 0; i < N; i++) {
    scanf("%d", &ThirdDay[i]);
    ThirdDay[i]--;
  }
  for (int i = 0; i < N; i++) Answer[SecondDay[i]] = ThirdDay[i];
  for (int i = 0; i < N; i++) cout << Answer[i] + 1 << " ";
  cout << endl;
  return 0;
}
