Task: Program Execution
Input (English): 3, 7, ['W', '1755', 'P', '5985', 'd', 'f', 'Z', '7283', 'o']
Output (English): 5985