Task: Program Execution
Input (English): 5, 5, ['F', '4479', 'R', 'n', '3949', 'Q', 'm', 'C', '5817']
Output (English): 3949