Task: Program Execution
Input (English): 4, 7, ['J', '5305', '2571', 'L', 'w', 'L', 'R', 'W', '4297', '3883', '8167']
Output (English): LwLR