Task: Program Execution
Input (English): Q, 3619, D, 6323, 3227, d, M, 4513, 2551, 9373, T
Output (English): 1, 3, 6, 7, 11