Task: Program Execution
Input (English): A, 7697, b, 9507, 3195, 6541, 2229, 4831, M
Output (English): 1, 3, 9