#include
using namespace std;
void duplicate(char a[], int i )
{
//base case
if(a[i]==’\0’)
{
return;
}
//recursive case
if(a[i]==a[i+1])
{
int j=i+1;
while (a[j]!=’\0’)
{
j++;
}
while (j>=i+1)
{
a[j+1]=a[j];
j–;
}
a[i+1]=’*’;
}
else duplicate( a , i+1);
}
int main() {
char a[10000];
int i=0;
cin>>a;
duplicate (a,0);
cout<<a;
return 0;
}