Task: Program Execution
Input (English): q, 149, h, 223, 47, 291, k
Output (English): 1, 2, 3, 4, 7, 9