Task: Program Execution
Input (English): 867 F r 5121 5419 7875 2177 8857 N 4457 N 8909 m 1047 5715 3275 B P 4497 2815 V z 5081 1995 8583 H 6117 5767 1707
Output (English): 867, 6, 18, 5121, 5419, 7875, 2177, 8857, 14, 4457, 14, 8909, 13, 1047, 5715, 3275, 2, 16, 4497, 2815, 22, 26, 5081, 1995, 8583, 8, 6117, 5767, 1707