Task: Program Execution
Input (English): 6, 10, ['N', 'j', 'D', 'm', '8499', '2781', 'B', 'h', '671', 'q', 'T', '4017', 'p', 'p']
Output (English): q, 671, h, B, 2781