Task: Program Execution
Input (English): 4, 12, ['j', 'O', 'u', '7307', '9421', '4939', '7251', 'w', '8635', 'c', '8435', '5743', '8465', 'z']
Output (English): 51731