#include<iostream.h> #include<string.h> void main() { char s[200]; int i=0; cin>>s; while(i<strlen(s)-1) { if(s[i]==s[i+1]) { strcpy(s+i,s+i+2); if(i>0) i=i-1; } else i++; } cout<<s; }