Task: Program Execution
Input (English): 5, 7, ['K', '8005', 'T', 'a', 'b', 'R', '8595', '1917', 'd', 'B']
Output (English): 8595