s = input() t = 0 c = "" for i in s: if i == "#": t += 1 if t == 2: c += i if i == "#": t += 1 print(c)