Task: Program Execution
Input (English): 2, 3, ['O', 'A', '2723', 'L', 'Q', '4671', 'h', '4847', '5815', '8721', '7009', '4207', 'A', '6789', 'N', '741']
Output (English): A, Q, 4847, 7009, 6789