Task: Program Execution
Input (English): 3, 3, ['1747', 'W', 'R', '8861']
Output (English): 0