Task: Program Execution
Input (English): n, p, 815, 3089, G, 3591, 4093, 3073, D, y, 8993
Output (English): 1, 2, 5, 9, 10