Task: Program Execution
Input (English): 3, 12, ['H', '1629', '917', '7907', 'v', '9481', 'W', 'J', 'f', 'F', 'U', 'q']
Output (English): 18305