S = input() ans = [] flag = False for s in S: if s=="#": flag = not flag else: if flag: ans.append(s) print("".join(ans))