var s:string;i:byte;begin while not eof do begin readln(s);for i:=2to length(s)do if s[i]<>s[i-1]then write(s[i-1]);writeln(s[i])end;end.