Task: Program Execution
Input (English): 7, 7, ['n', 'P', '4479', 'b', '4593', 'M', '2109', 'F']
Output (English): 2109