Task: Program Execution
Input (English): 2709, 5137, B, F, T, 8829, 7125, T, 1517, 1031, p, J, B, 1293, 2241, S, 3285, q, n
Output (English): 2709, 5137, 2, 6, 20, 8829, 7125, 20, 1517, 1031, 16, 10, 2, 1293, 2241, 19, 3285, 17, 14