Task: Program Execution
Input (English): 6147 7677 v 3999 3113 8971 d 3463 N 8999 3255 1145 h 9247 X 3115 4525 353 d l 8523 1799 9933 Y 2559 4849 x
Output (English): 6147, 7677, 22, 3999, 3113, 8971, 4, 3463, 14, 8999, 3255, 1145, 8, 9247, 24, 3115, 4525, 353, 4, 12, 8523, 1799, 9933, 25, 2559, 4849, 24