#include <bits/stdc++.h>
using namespace std;
const int N = 101001;
int a[N], b[N], p[N];
int n;
map<int, int> pom;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= (n); ++i) {
    scanf("%d", &b[i]);
    pom[b[i]] = i;
  }
  for (int i = 1; i <= (n); ++i) {
    p[a[i]] = b[i];
  }
  for (int i = 1; i <= (n); ++i) printf("%d ", p[i]);
  printf("\n");
}
