Task: Program Execution
Input (English): 4, 4, ['3795', 'D', '3057', '7091', 'h', '6181', '839', '6249', '4461', 'h', '811', 'Q', '5869']
Output (English): 7091