#include <bits/stdc++.h>
inline int Max(int a, int b) { return a > b ? a : b; }
inline int Min(int a, int b) { return a < b ? a : b; }
inline int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
inline int bit(int x) { return (int)log10((double)x) + 1; }
inline int lowbit(int x) { return x & -x; }
inline int highbit(int x) {
  while (x != lowbit(x)) x ^= lowbit(x);
  return x;
}
inline int whichbit(int x) {
  int ret = 0;
  while (x > 1) {
    x >>= 1;
    ret++;
  }
  return ret;
}
using namespace std;
const double pi = M_PI;
const int inf = 1000000007;
const int mod = 10000;
const double eps = 1e-6;
const int maxn = (1 << 15) + 5;
const int maxm = 1005;
const int maxe = maxn * 4;
int s[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    s[x] = i;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    printf("%d ", s[x]);
  }
  return 0;
}
