s=str(input()) word=[] a=str(0) for i in s: if a!=i: a=i word.append(i) words=''.join(word) print(words)