#include
char* fun(char *s){
int i=0,j=0,k=0,f1=0,f2=0;
while(s[i]=='*')
k=++i;
while(s[i]){
if(s[i]!='*' && f1==0){ //字母首次出现
j=k;
f1=1;
f2=0;
}else if(s[i]=='*' && f2==0){ //*首次出现
k=j;
f2=1;
f1=0;
}
s[j++]=s[i++];
}
s[j]=0;
return s;
}
int main(){
char str[]="*******A*BC*DEF*G*****";
printf("%s\n",fun(str));
return 0;
}