import re

print(re.sub(r'000(?!0)', ' ', '76000123000100000101000').strip())