Task: Program Execution
Input (English): 4, 12, ['w', 'C', '5877', 'W', 'L', '7581', 'L', '909', 'Q', 'a', 'v', 'W', 'R', '4779', '6749', '337', '4719', 'c', '2315', '5855', '6631']
Output (English): 8490