Task: Program Execution
Input (English): v, g, 37, 11, x, 389
Output (English): 1, 3, 7, 8, 9