Task: Program Execution
Input (English): 5429 1401 5767 s t 7107 Q 7609 I Q 9377 3 6023 M 5923 1365 9213 p 6373 q 4605 H G c 6161
Output (English): 5429, 1401, 5767, 19, 20, 7107, 17, 7609, 9, 17, 9377, 3, 6023, 13, 5923, 1365, 9213, 16, 6373, 17, 4605, 8, 7, 3, 6161