Task: Program Execution
Input (English): A 1985 2887 3947 y M 8803 p 5611 E x r F h 9995 6061 1553 N r 2437 6405 g J g Y L 3937 5267 1907
Output (English): 1, 1985, 2887, 3947, 25, 13, 8803, 16, 5611, 5, 24, 18, 6, 8, 9995, 6061, 1553, 14, 18, 2437, 6405, 7, 10, 7, 25, 12, 3937, 5267, 1907