#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
using namespace std;
vector<pair<int, int>> sur = {{1, 0},   {0, -1}, {0, 1},  {-1, 0},
                              {-1, -1}, {1, 1},  {1, -1}, {-1, 1}};
bool bounds(int i, int j, int n, int m) {
  return i >= 0 && i <= n && j >= 0 && j <= m;
}
long long t, x, y, c, k, n, A, B, m;
string s;
string s2;
const int maxn = 207;
vector<vector<long long>> g;
map<long long, long long> p;
vector<long long> arr;
vector<long long> arr2;
vector<bool> visited;
vector<bool> primes;
void sieve(long long n) {
  primes = vector<bool>(n + 1, true);
  for (long long i = 2; i * i <= n; i++) {
    if (primes[i]) {
      for (long long j = i * i; j < n; j += i) {
        primes[j] = false;
      }
    }
  }
}
long long binpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
bool allSame(vector<long long>& arr) {
  for (int i = 0; i < arr.size() - 1; i++) {
    if (arr[i] != arr[i + 1]) {
      return false;
    }
  }
  return true;
}
void readArr(long long n) {
  arr = vector<long long>(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  vector<long long> arr(n);
  vector<long long> arr2(n);
  map<long long, long long> indexes;
  map<long long, long long> indexes2;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    indexes[arr[i]] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cin >> arr2[i];
    indexes2[arr2[i]] = i + 1;
  }
  vector<long long> k(n);
  for (int i = 1; i <= n; i++) {
    k[indexes2[i] - 1] = indexes[i];
  }
  for (int i = 0; i < n; i++) {
    cout << k[i] << " ";
  }
  cout << endl;
  return 0;
}
