/* Code for problem A by cookiedoth Generated 09 Apr 2021 at 03.23 PM ,##. ,==. ,# #. \ o ', # # _ _ \ \ # # (_) (_) / ; `# #' / .' `##' "==" -_- z_z >_< */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define ld long double #define null NULL #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define debug(a) cerr << #a << " = " << a << endl #define forn(i, n) for (int i = 0; i < n; ++i) #define length(a) (int)a.size() using namespace std; template int chkmax(T &a, T b) { if (b > a) { a = b; return 1; } return 0; } template int chkmin(T &a, T b) { if (b < a) { a = b; return 1; } return 0; } template void output(iterator begin, iterator end, ostream& out = cerr) { while (begin != end) { out << (*begin) << " "; begin++; } out << endl; } template void output(T x, ostream& out = cerr) { output(x.begin(), x.end(), out); } void fast_io() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } signed main() { fast_io(); string s; cin >> s; string ans; for (int i = 0; i < s.size(); ++i) { if (i == 0 || s[i] != s[i - 1]) { ans.push_back(s[i]); } } cout << ans << '\n'; }