Task: Program Execution
Input (English): 6, 14, ['E', 'c', 'I', '2605', '4505', '9335', '4553', 'P', '6031', '5681', '3715', '7541', '5931', 'h']
Output (English): 42787