Task: Program Execution
Input (English): 4119, 3531, P, 2899, 1783, 1219, N, 8871
Output (English): 1, 2, 4, 5, 6, 8