Task: Program Execution
Input (English): 3, 5, ['5619', '5653', 'g', 'X', 'G']
Output (English): gXG