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