Task: Program Execution
Input (English): 4, 6, ['R', '3429', '2581', '5809', 'R', 'Q', '1637', 'G', 'C', '8897', '5577', 'N', 'v', 'n', 'f', '5885']
Output (English): QR9085