Task: Program Execution
Input (English): 2, 3, ['X', 'G', '6297', '3189']
Output (English): 6297G