Task: Program Execution
Input (English): 1, 6, ['1271', '7641', '3239', 'J', '3107', '8789']
Output (English): 24047