Task: Program Execution
Input (English): 3, 12, ['3585', 'q', 'U', 'L', '5893', '9031', '2143', 'u', 'H', '2509', 't', '1741']
Output (English): 21317