S = list(input()) ans = [] isok = False for i in range(len(S)): if isok and S[i] == "#": isok = False elif not isok and S[i] == "#": isok = True elif isok: ans.append(S[i]) print(*ans, sep="")