Task: Program Execution
Input (English): 2, 3, ['3071', 'D', 'A']
Output (English): AD