Task: Program Execution
Input (English): 2417, 1231, G, 1457, 7641, 7163, R, M, 4015
Output (English): 1, 2, 4, 5, 6, 9