Task: Program Execution
Input (English): 1267, F, 1809, s, 5007, G, 1367, L, c, 5787, 4357, S
Output (English): 1267, 1809, 5007, 1367, 5787, 4357