#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); vector a(5), b(5); for(int i = 0; i < 5; i++)cin >> a[i]; for(int i = 0; i < 5; i++)cin >> b[i]; for(int i = 0; i < 5; i++){ cout << b[a[i] - 1] << (i + 1 == 5 ? '\n' : ' '); } }