Task: Program Execution
Input (English): 2, 8, ['l', '5139', '9675', '691', 'r', 'K', 'X', 'O']
Output (English): 15505