#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> p[100100];
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> p[i].first;
  for (long long i = 0; i < n; i++) cin >> p[i].second;
  sort(p, p + n);
  for (long long i = 0; i < n; i++) cout << p[i].second << " ";
  return 0;
}
