Task: Program Execution
Input (English): 2, ['9947', '9413', 'm', 'D', '4977', '9205', 'M', '1801']
Output (English): 9947, m, 4977, M