Task: Program Execution
Input (English): 2369, 8709, 5307, r, 3633, g, 2349, S, K, C, 8029, 1489, s, 8743, 5731, 4531, C, 2957, 4719, 1883, 3821
Output (English): 2369, 8709, 5307, 3633, 2349, 8029, 1489, 8743, 5731, 4531, 2957, 4719, 1883, 3821