Task: Program Execution
Input (English): 2, 5, ['S', '8161', '1063', '8345', '7415', 'E', 'X', '5085', '4329', '3201', '1823', '7649', 'r', '3431', 'O', 'p']
Output (English): 8161, X, 7649