Task: Program Execution
Input (English): 3, 3, ['6187', 'A', 'Q', 'a']
Output (English): 0