Task: Program Execution
Input (English): 8031, 9783, 6137, 6661, 7435, 6325, n, M
Output (English): 6