Task: Program Execution
Input (English): 5, 8, ['h', '7593', 'D', 'B', '3087', '8615', 'Q', '2241', 'Q', '9029', '5159', '251', '9831', '3277']
Output (English): 2241, Q, 8615, 3087