Task: Program Execution
Input (English): 2, 3, ['4601', '1107', 'R']
Output (English): R7011