import sys readline=sys.stdin.readline ans_lst=[] for s in readline().rstrip(): if ans_lst and ans_lst[-1]==s: continue ans_lst.append(s) print(*ans_lst,sep="")