#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) int main() { constexpr int n = 5; vector a(n), b(n); rep(i, n) cin >> a[i]; rep(i, n) cin >> b[i]; rep(i, n) { cout << a[b[i] - 1] << " \n"[i == n - 1]; } return 0; }