Task: Program Execution
Input (English): g, 243, 381
Output (English): 1, 2, 3, 4, 8