#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 10;
const long long INF = 0x3f3f3f3f;
const long long Mod = 1e9 + 7;
int n, m, x, y, t;
struct node {
  int a;
  int b;
} n1[maxn], n2[maxn];
int cmp(node a, node b) { return (a.a < b.a); }
int ans[maxn];
int main() {
  cin >> n;
  for (long long i = 0; i < (n); i++) {
    cin >> n1[i].a;
    n1[i].b = i + 1;
  }
  for (long long i = 0; i < (n); i++) {
    cin >> n2[i].a;
    n2[i].b = i + 1;
  }
  sort(n1, n1 + n, cmp);
  sort(n2, n2 + n, cmp);
  for (long long i = 0; i < (n); i++) {
    ans[n2[i].b - 1] = n1[i].b;
  }
  for (long long i = 0; i < (n); i++) {
    cout << ans[i] << ' ';
  }
  return 0;
}
