Task: Program Execution
Input (English): q, M, 3813, F, 685, 2555, 5129, E, Z, O
Output (English): 1, 2, 4, 8, 9, 10