Task: Program Execution
Input (English): 3977 N R 9165 E Y 7009 r R 4641 H 415 H x 5477 P 9327 9909 2175 5361 M 4357 F 273 q B I h 6265 D 4593 G G
Output (English): 3977, 14, 18, 9165, 5, 25, 7009, 18, 18, 4641, 8, 415, 8, 24, 5477, 16, 9327, 9909, 2175, 5361, 13, 4357, 6, 273, 17, 2, 9, 8, 6265, 4, 4593, 7, 7