Task: Program Execution
Input (English): 5, 5, ['9317', 'Z', 'v', 'S', '5069', '2357', '7871']
Output (English): 5069