Task: Program Execution
Input (English): 3, 6, ['Y', '2209', 'd', 'M', 'A', '3787', '7229', '7645', 'x', 'g', '8071', 'X', '2387']
Output (English): 3787, A, M, d