Task: Program Execution
Input (English): 8, ['351', 'S', '3807', 'Y', 'L', '7469', 'H', '3477', '401', 'l', '8729', '6971', 'p', 'F', 'B', '6187', 'Z']
Output (English): 351, 401, Z