Task: Program Execution
Input (English): 5923 U M 165 d T J 8237 7727 3789 L d 7863 5087 D r P w 8891 m 8661 l 6311 9677 8313 8779 6007 8769 7261 7779 9597 a 7205 N a h
Output (English): 5923, 21, 13, 165, 4, 20, 10, 8237, 7727, 3789, 12, 4, 7863, 5087, 4, 18, 16, 23, 8891, 13, 8661, 12, 6311, 9677, 8313, 8779, 6007, 8769, 7261, 7779, 9597, 1, 7205, 14, 1, 8