#include <bits/stdc++.h>
using namespace std;
void init_code() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return (gcd(b, a % b));
}
void lps(vector<long long int>& v) {
  for (int i = 1; i < (int)(v.size()); i++) v[i] += v[i - 1];
}
void lss(vector<long long int>& v) {
  for (int i = (int)(v.size()) - 2; i >= 0; i--) v[i] += v[i + 1];
}
void ps(vector<int>& v) {
  for (int i = 1; i < (int)(v.size()); i++) v[i] += v[i - 1];
}
void second(vector<int>& v) {
  for (int i = (int)(v.size()) - 2; i >= 0; i--) v[i] += v[i + 1];
}
void solve() {
  int n;
  cin >> n;
  vector<int> d4(n);
  vector<int> d3(n);
  vector<int> p(n);
  map<int, int> make_pair;
  for (int i = 0; i < n; i++) {
    cin >> d3[i];
    make_pair[d3[i]] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cin >> d4[i];
    p[i] = make_pair[d4[i]];
  }
  for (int i = 0; i < n; i++) {
    cout << p[i] << " ";
  }
  cout << "\n";
}
int main() {
  init_code();
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
