Task: Program Execution
Input (English): 4, 7, ['W', 'Q', 'v', '2977', 'B', '6969', 'v']
Output (English): 9946