Task: Program Execution
Input (English): q, 147, z, 105, r
Output (English): 0, 1, 4, 5, 7