Task: Program Execution
Input (English): 2661, g, 2903, i, M, 9583, g, K, 4287, r
Output (English): 1, 3, 6, 9