Task: Program Execution
Input (English): Q, 995, A, f
Output (English): 1, 3, 4