print(""++io.Source.stdin replaceAll("@+(.)\\1*|(.)\\2*","$1$1$2"))