Task: Program Execution
Input (English): M, R, J, 9709, i, V, q, 8319, 3059, 8245
Output (English): 4, 8, 9, 10