Task: Program Execution
Input (English): 1863, 5939, f, M, A, 5723, r, g, 5373, Z
Output (English): 1, 2, 6, 9