Task: Program Execution
Input (English): 3845, 1235, 871, 4997, 2963, 4307, w
Output (English): 1, 2, 3, 4, 5, 6