Task: Program Execution
Input (English): t, Q, D, 3007, x, D
Output (English): 1, 2, 3, 5, 6