Task: Program Execution
Input (English): N Q 9621 1067 9399 D 5623 o P 4791 a u 7613 4543 P 1509 p B 2501 f 907 p K K 1087 969 T J j x
Output (English): 14, 17, 9621, 1067, 9399, 4, 5623, 15, 16, 4791, 1, 21, 7613, 4543, 16, 1509, 16, 2, 2501, 6, 907, 16, 11, 11, 1087, 969, 20, 10, 10, 24