#include using namespace std; using ll = long long; #define FOR_LL( VAR , INITIAL , FINAL_PLUS_ONE ) for( ll VAR = INITIAL ; VAR < FINAL_PLUS_ONE ; VAR ++ ) #define RETURN( ANSWER ) cout << ( ANSWER ) << endl; return 0 int main() { constexpr const ll N = 6; ll A[N]; FOR_LL( i , 1 , N ){ cin >> A[i]; } ll B[5]; FOR_LL( i , 1 , N ){ cin >> B[i]; } FOR_LL( i , 1 , N ){ cout << A[B[i]]; if( i < N ){ cout << " "; } } RETURN( "" ); }