#include <bits/stdc++.h>
using namespace std;
int64_t to_int(string s) {
  stringstream conv(s);
  int64_t x = 0;
  conv >> x;
  return x;
}
int64_t ceil(int64_t a, int64_t b) {
  if (a % b == 0) {
    return a / b;
  } else {
    return a / b + 1;
  }
}
void setIO(string s = "") {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  if ((int64_t)(s).size()) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
  }
}
vector<int64_t> dx = {0, 1, 0, -1};
vector<int64_t> dy = {1, 0, -1, 0};
void solve() {
  int n;
  cin >> n;
  vector<int> p(n + 1);
  vector<int> tmp(n), tmp1(n);
  for (auto& i : tmp) {
    cin >> i;
  }
  for (auto& i : tmp1) {
    cin >> i;
  }
  for (int64_t(i) = 0; (i) < n; i++) {
    p[tmp[i]] = tmp1[i];
  }
  for (int64_t(i) = 1; (i) < n + 1; i++) {
    cout << p[i] << ' ';
  }
}
int main(void) {
  setIO();
  int64_t t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
