Task: Program Execution
Input (English): 379, u, 187, d
Output (English): 1, 3, 7, 8, 9