#include <bits/stdc++.h>
using namespace std;
unsigned long long Abs(unsigned long long x) {
  if (x < 0) return -x;
  return x;
}
int N;
int a[100005] = {0};
int b[100005];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int v;
    scanf("%d", &v);
    a[v] = i + 1;
  }
  vector<int> ans;
  for (int i = 0; i < N; i++) {
    int v;
    scanf("%d", &v);
    ans.push_back(a[v]);
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
