Task: Program Execution
Input (English): 3, ['3149', '8767', 'W', '6435', '7451', 'S', '9375', 'P']
Output (English): 3149, 6435, 9375