S = input() t = [S[0]] for c in S[1:]: if c == t[-1]: continue t.append(c) print(''.join(t))