Task: Program Execution
Input (English): 2, 12, ['h', '593', 'H', 'u', 'J', '3739', '7811', 'f', 'k', 'V', 'n', 'K', '5705', 'S', '8487', '8107', '1647', '3619']
Output (English): 12143