s=input() flag=0 ans=[] for e in s: if e=="#": flag^=1 continue if flag: ans.append(e) print("".join(ans))