Task: Program Execution
Input (English): 6, 10, ['X', '5605', 'x', '4395', '3449', '4951', 'O', '5421', '1779', '6279', '95', '8645', 'b', 'c']
Output (English): 18430