#include <bits/stdc++.h>
const int Inf = 1e9;
long long LINF = (long long)4e18;
const long long mod = 1e9 + 7;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> q(n + 1);
  for (int(i) = 0; (i) < n; (i)++) {
    int x;
    cin >> x;
    q[x] = i + 1;
  }
  vector<int> ans(n + 1);
  for (int(i) = 0; (i) < n; (i)++) {
    int x;
    cin >> x;
    ans[i + 1] = q[x];
  }
  for (int(i) = 1; (i) < n + 1; (i)++) {
    cout << ans[i] << " ";
  }
  return 0;
}
