Task: Program Execution
Input (English): r, 8351, A, h, B, 4481, 1391, 6151, 1559, U, n
Output (English): 1, 3, 4, 5, 10, 11