Task: Program Execution
Input (English): 2, 8, ['5417', 'T', '6195', 'w', 'K', '1261', '3525', '7785', 'J']
Output (English): 18766