Task: Program Execution
Input (English): U 2861 R 4471 X 2377 z 8547 4365 M Z 9149 R 3995 O 103 8001 1351 6945 2189 6711 4151 1285 b 4285 U E 3013 2889 8145
Output (English): 21, 2861, 18, 4471, 24, 2377, 26, 8547, 4365, 13, 26, 9149, 18, 3995, 15, 103, 8001, 1351, 6945, 2189, 6711, 4151, 1285, 2, 4285, 21, 5, 3013, 2889, 8145