#include <bits/stdc++.h>
int arr[100001];
int ans[100001];
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int tmp;
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  for (int i = 0; i < n; ++i) cin >> tmp, ans[arr[i] - 1] = tmp;
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  return 0;
}
