Task: Program Execution
Input (English): Q, 6787, 7463, 9661, U, 2707, 1317, 7151, 8041, 9419, v, h, O
Output (English): 2, 3, 4, 6, 7, 8, 9, 10