Task: Program Execution
Input (English): 6, 11, ['51', '4831', '1381', 'P', '2039', '1875', '953', '1917', '4383', '8115', 'B']
Output (English): 17243