Task: Program Execution
Input (English): 3, 8, ['X', 'C', '9827', 'G', '1043', '7183', '7539', '9947', 'q', '4311']
Output (English): 9947, 7539, 7183, 1043, G, 9827