Task: Program Execution
Input (English): 8785, 3431, 7887, X, 3507, 1011, 5513, 9929, 3445, 7341, S
Output (English): 1, 2, 3, 5, 6, 7, 8, 9, 10