ans = [] S = input() flag = 0 for s in S: if s == "#": if flag: flag = 0 else: flag = 1 if flag: ans.append(s) ans.pop(0) print(*ans, sep="")