Task: Program Execution
Input (English): 4, 4, ['V', 'A', '7223', '7331']
Output (English): 7331