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