Task: Program Execution
Input (English): I, M, d, q, 1439, 4165, 1551, 3871, Y
Output (English): 1439, 4165, 1551, 3871