Task: Program Execution
Input (English): 3, ['P', 'M', '2477', '3191', '9855', 'v', 'F']
Output (English): P, M, 2477, 3191