Task: Program Execution
Input (English): 3, ['1051', '1331', '8509', '1661', 'D', 'Y', 'M', 'b', 'M', '1527', '2285', '8671', '6541']
Output (English): 1051, 1661, M, 1527, 6541