Task: Program Execution
Input (English): p, 397, 439, 363, 379, 317, d, b
Output (English): 1, 3, 4, 6, 7, 9