Task: Program Execution
Input (English): H 4973 335 R 9595 3393 J 1233 m W 3359 n 6893 3799 n g 3361 y 1921 y P 1333 5285 9637 787 5315 2265
Output (English): 8, 4973, 335, 18, 9595, 3393, 10, 1233, 13, 23, 3359, 14, 6893, 3799, 14, 7, 3361, 25, 1921, 25, 16, 1333, 5285, 9637, 787, 5315, 2265