S = input() N = len(S) c = S[0] print(c, flush=False, end='') for s in S[1:]: if s == c: continue c = s print(c, flush=False, end='') print()