#include <bits/stdc++.h>
using namespace std;
double PI = 2 * acos(0);
std::vector<int> vi;
long long n;
long long a[100005], b[100005];
int main(int argc, char const *argv[]) {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    cin >> b[a[i]];
  }
  for (long long i = 1; i <= n; i++) {
    cout << b[i] << " ";
  }
  cout << endl;
  return 0;
}
