Task: Program Execution
Input (English): R, 9563, F, 5341, 8489, 177, 6695, B
Output (English): 2, 4, 5, 6, 7