Task: Program Execution
Input (English): 261, 495, d, 131, b, g, w
Output (English): 1, 2, 3, 4, 5, 6, 9