t="" f=0 for c in input(): if c=="#": if f: print(t) else: f=1 else: if f: t+=c