Task: Program Execution
Input (English): 3, 4, ['O', '7371', '9273', 'G']
Output (English): G3729