Task: Program Execution
Input (English): 2, 2, ['5867', 'Q', 'B', '8469', '1815', '2823', '9787', 'b', '303', '3971', 'D', 'E']
Output (English): Q, 8469, 2823, b, 3971, E