Task: Program Execution
Input (English): Q, 9243, 8295, 7249, t, W, 5563, v, 1813, n, 1001
Output (English): 1, 5, 6, 8, 10