Task: Program Execution
Input (English): 389, v, 17, n, m
Output (English): 1, 3, 7, 8, 9