Task: Program Execution
Input (English): 2, 12, ['A', 'A', '1151', '1393', 'D', '5205', '1641', '3419', 'U', '4539', '4619', '9663', '5627', 'N', '6037', '4833', '8999', '1293', '1051', '9333', '9137', '3927', 'M', 'Q', '7007', '4487']
Output (English): A, N, 4487