Task: Program Execution
Input (English): E, 1739, 4669, 3797, 6251, P, 9731, b, w
Output (English): 2, 3, 4, 5, 7