Task: Program Execution
Input (English): 5, 9, ['U', 'm', '9917', '8087', '8563', 'P', '9827', 'R', 'p', '1353', '5613', 'G', '5291', '3989', '5443', 'G', '2103']
Output (English): pR7289P3658