Task: Program Execution
Input (English): 1, 4, ['3581', '5047', '7291', 'G']
Output (English): 15919