Task: Program Execution
Input (English): 2975 F 4539 1671 I C 7135 a H d t 4211 5737 m g 5151 951 J D t 8303 5085 6401 359 771 I 4501 867 W 8585 t 9019 1081 c W w 1635
Output (English): 2975, 6, 4539, 1671, 9, 3, 7135, 1, 8, 4, 20, 4211, 5737, 13, 7, 5151, 951, 10, 4, 20, 8303, 5085, 6401, 359, 771, 9, 4501, 867, 23, 8585, 20, 9019, 1081, 3, 23, 23, 1635