Task: Program Execution
Input (English): A, 2607, W, 6951, 7917, 4777, 8213, w
Output (English): 1, 3, 8