Task: Program Execution
Input (English): 2, 10, ['j', '1199', '8987', '3775', 'H', 'm', 'k', '1961', '3657', 'C']
Output (English): 19579