s=input() print(s[0],end='') if len(s)==1: exit() for i in range(1,len(s)): if s[i]==s[i-1]: continue print(s[i],end='')