Task: Program Execution
Input (English): 5, 5, ['o', '5945', 'D', '3829', '4891']
Output (English): 4891