Task: Program Execution
Input (English): p, 5119, Q, D, 9473, N, 5007
Output (English): 2, 5, 7