Task: Program Execution
Input (English): 3, 3, ['U', 'r', 'V']
Output (English): 0