Task: Program Execution
Input (English): 3, 5, ['f', '3797', 'm', 'Q', 'g', '1147']
Output (English): mQg