#PyPy用 from sys import stdout wt=stdout.write def main(): S=input() if len(S)<2: print(S) return wt(S[0]) a=S[0] for i in range(1,len(S)): if S[i]!=a: wt(S[i]) a=S[i] wt("\n") return main()