Task: Program Execution
Input (English): 2, 2, ['Z', 'Q', 'B', '9687', 'Q', '3725', '647', '8285', '9551', '5263', 'N', 'M']
Output (English): Q, 9687, 3725, 8285, 5263, M