#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323;
const long long int mod = (long long int)1e9 + 7;
const long long int inf = 1e18;
int solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n + 1), b(n + 1);
  for (long long int i = 1; i <= (n); i++) cin >> a[i];
  for (long long int i = 1; i <= (n); i++) cin >> b[i];
  vector<long long int> v(n + 1);
  for (long long int i = 1; i <= (n); i++) v[a[i]] = b[i];
  for (long long int i = 1; i <= (n); i++) cout << v[i] << " ";
  cout << "\n";
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
