(lambda *s: print(*(s[i] for i in range(len(s) - 1) if s[i + 1] != '0'), s[-1]))(*__import__('sys').stdin.read().split())