S = input() s = "" now = "" for i in range(len(S)): if now == S[i]: continue s += S[i] now = S[i] print(s)