Task: Program Execution
Input (English): f, 291, 145, d, z, 355, r
Output (English): 1, 2, 3, 4, 5, 9