Task: Program Execution
Input (English): 327 S 577 W v 4623 M 8767 8947 c u z 3563 D 6911 693 1611 O a h G 9627 C 2949 3835 p 9019 P U P
Output (English): 327, 19, 577, 23, 22, 4623, 13, 8767, 8947, 3, 21, 26, 3563, 4, 6911, 693, 1611, 15, 1, 8, 7, 9627, 3, 2949, 3835, 16, 9019, 16, 21, 16