Task: Program Execution
Input (English): 2, 2, ['J', '1171', '6305', '5547']
Output (English): 1171