s=input() ans="" k=0 for i in s: if k==0: if i=="#": k=1 else: if i=="#": k=0 else: ans+=i print(ans)