Task: Program Execution
Input (English): 1, 5, ['H', '3513', '7631', '5627', 'W', '7717']
Output (English): 16771