Task: Program Execution
Input (English): 2, 9, ['c', '1117', 'S', '3117', 'J', 'a', '329', '6283', 'g', '733', 'J']
Output (English): g, 6283, 329, a, J, 3117, S, 1117