Task: Program Execution
Input (English): 5, 5, ['W', 'B', '3999', '2775', '9155', '1063', 'm', '929', '7057']
Output (English): 9155