#include <iostream>
#include <string>
using namespace std;
class ErasingCharacters{
public:
string simulate(string s){
bool disposed=true;
while(disposed){
disposed=false;
for(int i=0;i<s.size()-1;i++){
if(s[i]==s[i+1]){
disposed=true;
s.erase(i,2);
break;
}
}
}
return s;
}
};
#include <string>
using namespace std;
class ErasingCharacters{
public:
string simulate(string s){
bool disposed=true;
while(disposed){
disposed=false;
for(int i=0;i<s.size()-1;i++){
if(s[i]==s[i+1]){
disposed=true;
s.erase(i,2);
break;
}
}
}
return s;
}
};