Task: Program Execution
Input (English): 6, 8, ['7931', 'N', 'D', 'Y', 'q', '4195', '1221', '295']
Output (English): 5711