Task: Program Execution
Input (English): [641, 'p', '2377', '4521', '7671', 'g', '1955', 'S', 'D'], [1903, 7973, 6901, 8569, 1675, '2377', '4521', '7671', 'g', '1955', 'M', 'M', 'c']
Output (English): 2377, 4521, 7671, g, 1955