Task: Program Execution
Input (English): 3, 3, ['5623', 'u', 'D', 'B', '5147']
Output (English): D