#!/usr/bin/env python3 import sys def main(): S = input() ans = [S[0]] for i in range(len(S) - 1): if S[i] == S[i + 1]: continue ans.append(S[i + 1]) print(*ans, sep="") if __name__ == '__main__': main()