#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
void inv(int n, int a[], int b[], int p[]) {
  static int h[maxn];
  for (int i = 1; i <= n; ++i) {
    h[a[i]] = i;
  }
  for (int i = 1; i <= n; ++i) {
    p[i] = h[b[i]];
  }
}
void solve(int n) {
  static int a[maxn], b[maxn], p[maxn];
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int j = 1; j <= n; ++j) cin >> b[j];
  inv(n, a, b, p);
  for (int k = 1; k <= n; ++k) cout << p[k] << " ";
  cout << endl;
}
int main() {
  for (int n; cin >> n; solve(n))
    ;
}
