Task: Program Execution
Input (English): 4, 5, ['x', '2371', '977', 'W', 'w']
Output (English): w, W