from itertools import groupby def main(): s = input() lst = [k for k, g in groupby(s)] print(''.join(lst)) if __name__ == "__main__": main()