Task: Program Execution
Input (English): 4, ['S', '4001', '1615', 'P', '7869', '4079', 'g', 'S', '4357', '5031']
Output (English): S, 4001, 1615, P