Task: Program Execution
Input (English): 4, 6, ['N', 'R', '5053', '3079', '5147', '387', '1803', '7207', 'Z', 'm', 'x', 'l', 'A', '2921', 'i', '8033', 'H', 'G']
Output (English): 8613