Task: Program Execution
Input (English): n, 5999, J, 713, d, 5239, 2443
Output (English): 2, 4, 6, 7