Task: Program Execution
Input (English): 3, 4, ['C', 'G', '9765', '695', '2387', '5627', 'Z']
Output (English): 10460