Task: Program Execution
Input (English): 2, 3, ['7131', '5985', 'R', 'Y', 'F', 'L']
Output (English): R5985