m=input() if m=="0": exit(0) else: s=m while True: n=input() if n=="0": break else: s=s+" "+"".join(n) print(s)