Task: Program Execution
Input (English): 3, 7, ['231', '5739', 'L', 'R', '2087', '9173', 'K', '5051']
Output (English): LR20879173K