#PyPy用 from sys import stdout wt=stdout.write def main(): S=input() 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()