#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
int toInt(char xx) { return xx - '0'; }
char toChar(int xx) { return xx + '0'; }
int isDigit(char xx) { return ('0' <= xx && xx <= '9'); }
bool isCharacter(char xx) {
  return (('a' <= xx && xx <= 'z') || ('A' <= xx && xx <= 'Z'));
}
void swapInt(int &x, int &y) {
  x = x ^ y;
  y = x ^ y;
  x = x ^ y;
}
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
const int Mod = 9901;
const int maxn = 1e5 + 10;
int exitInput = 0;
int n;
int a[maxn], b[maxn], p[maxn];
void read() {
  cin >> n;
  int i;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (i = 1; i <= n; ++i) {
    cin >> b[i];
  }
  for (i = 1; i <= n; ++i) {
    p[a[i]] = b[i];
  }
}
void init() {}
void solve() {
  cout << p[1];
  int i;
  for (i = 2; i <= n; ++i) {
    cout << " " << p[i];
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  int ntest = 1;
  int itest = 1;
  for (itest = 1; itest <= ntest; ++itest) {
    read();
    if (exitInput) {
      break;
    }
    init();
    solve();
  }
  return 0;
}
