int main()
{
	char str[200];
	int i;
	for(i=0;i<200;i++)
	{
		str[i]='a';
	}
	gets(str);
	for(i=0;i<strlen(str);i++)
	{
		if(str[i]!=' ')
		{
			cout<<str[i];
		}
		else
		{
			if(str[i+1]!=' ')
			{
				cout<<str[i];
			}
		}
	}
	cout<<endl;
	return 0;
}


int main()
{
	char *haha,sen[10000];
	int i=0,count;
	cin.getline(sen,10000);
    count=1;

	haha=sen;
	while(sen[i]!='\0')
	{

		if(sen[i]!=' ')
		{
			count=0;
			cout<<*(haha+i);
		}
		else
		{
			if(count==0)
			{
				cout<<" ";
				count++;
			}

		}
		i++;
	}

	return 0;
}


int main()
{
	char Buffer[200] = {0} ;
	gets(Buffer) ;
	int count = 0;
	while (Buffer[count])
	{
		count ++ ;
	}
	for (int i = 0 ; i < count - 1 ; i ++)
	{
		if (Buffer[i] == ' ' && Buffer[i+1] != ' ')
		{
			cout<<Buffer[i];
		}
		else if (Buffer[i] != ' ')
		{
			cout<<Buffer[i];
		}
	}
	cout<<Buffer[count - 1]<<endl ;
	return 0;
}


int main() {
  char str[110] ;
  int flag[110] ;
  memset(flag,1,sizeof(flag));
  gets(str);
  int len=strlen(str);
  int i;
  for(i=0; i<len-1;i++) {
     if(str[i]==' ' && str[i+1]==' ')
       flag[i+1]=0 ;
  }
  for(i=0; i<len; i++)
     if(flag[i]!=0)
       printf("%c",str[i]);
  return 1;
}


void main(){
	char str[1000];
	int i,len,judge;
	gets(str);
	len=strlen(str);
	judge=0;
	for(i=0;i<len;i++){
		if((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z')){
			printf("%c",str[i]);
			judge=0;
		}else if(str[i]=='.'){
			printf("%c",str[i]);
			judge=1;
		}else if(str[i]==' '&&judge==0){
			printf("%c",str[i]);
			judge=1;
		}else if(str[i]==' '&&judge==1){
			continue;
		}
	}
	printf("\n");
}


int main(int argc, char* argv[])
{ char a[101];
gets(a);
int i,word=0;
for(i=0;i<strlen(a)-1;i++){
	if(a[i]==' ') word=0;
	else word=1;
	if(word==1&&a[i+1]!=' '){
		printf("%c",a[i]);}
	if(word==1&&a[i+1]==' '){
		printf("%c ",a[i]);}
}
printf("%c",a[strlen(a)-1]);

return 0;
}


int main()
{
         char a[1000];
	int i,j;
	cin.getline(a,1000);
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]!=' ')continue;
		else
		{
			for(j=i+1;j<strlen(a);j++)
			{
				if(a[j]==' ')a[j]='0';
				else break;
			}
		}
	}
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]!='0')cout<<a[i];
	}
	return 0;
}


/*
 * guolvduoyudekongge.cpp
 *
 *  Created on: 2011-1-8
 *      Author: dyj
 */

int main(){
	char str[100];
	int n=0,i,j;
	gets(str);
	for(i=0;str[i]!='\0';i++){
		if(str[i]==' '){
			for(j=i;str[j]==' ';j++)
				n++;
			for(;str[j-1]!='\0';j++)
				str[j-n+1]=str[j];
			n=0;
		}
	}
	cout<<str<<endl;
	return 0;
}


int main()
{
    int i=0,flag=0;
    char buffer[10000];
    gets(buffer);//however gets is dangerous

while(buffer[i])
    {
        if(flag) // spaced
        {
            if(buffer[i]!=' ')
            {
                printf("%c",buffer[i]);
                flag=0;//reset flag
            }
        }
        else if(!flag) //not spaced
        {

           printf("%c",buffer[i]);
            if(buffer[i]==' ')
                flag=1;//set flag
        }
        i++;
    }
    return 0;
}


int main()
{
	char s[100];
	int n,i;
	gets(s);
	n=strlen(s);
	for(i=0;i<n-1;i++)
	{
		if(s[i]!=' ')
			printf("%c",s[i]);
		else
		{
			if(s[i+1]==' ') continue;
			else
				printf(" ");
		}
	}
	printf("%c",s[n-1]);
	return 0;
}


int main()
{
 char str[100];
 while (cin.getline(str, 101, '\n'))
 {
  if (str[0] == '\n')
   continue;
  int slen = strlen(str);
  for (char *p = str; p != &str[slen]; p++)
  {
   if (*p == ' ')
   {
    if (*(p + 1) != ' ')
     cout << ' ';
   }
   else
    cout << *p;
  }
  cout << endl;
 }
 return 0;
}


int main()
{
	int i,num=0;
	char str[105];
	cin.getline(str,105);
	char *p=str;
	for(i=0;i<strlen(str);i++)
	{
		if(*(p+i)!=' ')
			{
				cout<<*(p+i);
				num=0;
		    }
		if(*(p+i)==' '&&num==0)
			{
				cout<<' ';
				num++;
		    }

	}
	return 0;
}


int main(){
	char sentence[101],result[101];
	gets(sentence);
	int l;
	l=strlen(sentence);
	int i,j=0;
	for(i=0;i<l;i++){
		while(sentence[i]==' '&&sentence[i+1]==' '){
			i++;
		}
		result[j]=sentence[i];
		j++;
		if(i==l-1){
		result[j]='\0';

		}
	}
	int n=strlen(result);
	for(i=0;i<n;i++){
	printf("%c",result[i]);
	}

	return 0;
}


void main()
{
    char *p,*p0,*q;
    p0=p=(char *)malloc(100*sizeof(char));
    q=(char *)malloc(100*sizeof(char));
    gets(p);
    for(p=p0;*p!='\0';p++)
    {
        if(*p!=' ')printf("%c",*p);
        else for(q=p;*q!='\0';q++)
            if(*q!=' ')
            {
                p=q-1;
                printf(" ");
                break;
            }
    }
}


int main()
{
    char s[100];
	int flag=1;
    int i;
    gets(s);
   for(i=0;i<strlen(s);i++)
   if(s[i]==' ') flag=0;
   else {if(flag==0) printf(" ");
           printf("%c",s[i]),flag=1;}
    return 0;
}


int main()
{
	int i;
	char a[101];
	cin.getline(a, 101);
	char *p = a;
	for (i = 0; i < strlen(a); i++)
	{
		if (a[i] == ' ' && a[i + 1] == ' ')
			p++;
		else
		{
			cout << *p;
			p++;
		}
	}
	cin >> i;
	return 0;
}


int main()
{
	char str[100];
	gets(str);
	for(int i=0;i<strlen(str);i++)
	{
		if(str[i]==' ' && str[i+1]==' ')
		{
			for(int j=i;j<strlen(str);j++)
				str[j]=str[j+1];
			i--;
		}
	}
	cout<<str<<endl;
	return 0;
}


int main()
{
	char input[101],res[101],last;
	int len,i,j = 0;
	gets(input);
	last = input[0];
	len = strlen(input);
	for(i = 0;i < len;i++)
	{
		if(last == input[i] && last == ' ')
			continue;
		else
			res[j++] = input[i];
		last = input[i];
	}
	res[j] = '\0';
	printf("%s\n",res);

	return 0;
}


void main()
{ char s[100];
	int i;
	gets(s);
	for(i=0;i<strlen(s);i++){
		if(s[i]!=' '||s[i]==' '&&s[i-1]!=' ')
		printf("%c",s[i]);
		else

		continue;
		}
}


int main(int argc, char *argv[])
{
    char *p,a[101];
    for(p=gets(a);*p;p++)
    {
        if(*p==' '&&*(p-1)==' ') continue;
        printf("%c",*p);
    }
    return 0;
}


int main()
{
  char a[100];
  int i;
  gets(a);
  int m=strlen(a);
  for(i=0;i<m;i++)
  {
    if(a[i]==' '&&a[i+1]==' ')
    printf("");
    else  printf("%c",a[i]);

  }
  return 0;
}


int main()
{
	char a[200];
	int len,i,j,k,num=0;

	cin.getline(a,200);
	len=strlen(a);
	for(k=0;k<len;k++){
	num=0;
	for(i=0;i<len;i++){
		if(a[i]==' '){
			if(a[i+1]==' '){
			num++;
			for(j=i;j<=len-num;j++)
				a[j]=a[j+1];
		}
		}
	}
	}
	len=strlen(a);
	for(i=0;i<len;i++)
		cout<<a[i];
	return 0;
}


int main()
{
char a[101];
gets(a);
int l=strlen(a);
int k=1;
char b[101];
b[0]=a[0];
for(int i=1;i<=l;i++)
{
if(a[i]!=' ')
{b[k]=a[i];
k++;continue;}
if(a[i-1]!=' ')
{b[k]=a[i];
k++;continue;}
}
printf("%s",b);
return 0;
}


/*
 * guolv.cpp
 *
 *  Created on: 2011-1-8
 *      Author: qaj
 */
int main(){
	char ch[100];
	cin.getline(ch,100);
	int l=strlen(ch);
	for(int i=0;i<l;i++){
		if((ch[i]==' ')&&(ch[i+1]==' ')){
			for(int j=i;j<l;j++){
				ch[j]=ch[j+1];
			}
			i--;
		}
	}
	cout<<ch;
	return 0;
}


int main()
{
	char c[101];
	int empty=0;
	int i;
	gets(c);
	for (i=0;;i++)
	{
		if (c[i]==0) break;
		else if (c[i]==' '&&empty==0) {printf(" ");empty++;}
		else if (c[i]!=' ') {printf("%c",c[i]);empty=0;}
	}
    return 0;
}


int main()
{
	char str[100 + 10] = {'\0'};
	gets(str);
	int space = 1;
	for (int i = 0; str[i]; i ++)
	{
		if (str[i] == ' ' && space)
		    {space = 0; cout << str[i];}
		if (str[i] != ' ')
		    {space = 1; cout << str[i];}
	}
	cout << endl;
	return 0;
}


int main(int argc, char *argv[])
{
  char str[101]={' '};
  int i;
  gets(str);
  for(i=0;i<strlen(str);i++)
{
                   if(str[i]==' '&&str[i+1]!=' ')
                   printf("%c",str[i]);
                   else if(str[i]!=' ')
                   printf("%c",str[i]);
}

  return 0;
}


int main()
{
    char str[100];
    gets(str);
    int len = strlen(str);
    for(int i = 0 ; i < len ; i++)
    {
        if(str[i] == ' ')
        {
            cout << str[i];
            while(str[++i] == ' ');
        }
        cout << str[i];
    }
    return 0;
}


int main(){
	char a[MAX],b[MAX];
	int i,len,j;
	gets(a);
    len=strlen(a);
	for(i=0,j=0;i<len;i++){
		if(a[i]=='\0'){
			break;
		}
		if(a[i]==' '&&a[i+1]==' '){
			continue;
		}
		b[j]=a[i];
		j++;
	}
	b[j]='\0';
	puts(b);
	return 0;
}


int main()
{
	char str[101];

	cin.getline(str, 101);
	for (int i = 0; ; i++)
	{
		if (str[i] == ' ')
			if (str[i + 1] == ' ')
				str[i] = '0';
		if (str[i] == '\0') break;
	}
	for (int i = 0; ; i++)
	{
		if (str[i] == '\0') break;
		if (str[i] != '0')
			cout << str[i];
	}
	return 0;
}


void main(){
	char c;
	int flag=0;
	do{
		scanf("%c",&c);
		if(c==' '){
			if(flag==0){
				flag=1;
				printf("%c",c);
			}
			else
				flag=1;
		}
		else
			flag=0;
		if(flag==0)
			printf("%c",c);
	}while(c!='\n');
}


int main()
{
	char str[100];
	cin.getline(str, 100);
	int i, j;int count = 0;
	for (i = 0; str[i] != '\0'; i ++)
	{

		if(str[i] == ' ')
			count ++;
		if (count == 1 && str[i] != ' ')
		 count = 0;
		if( count >= 2 && str[i] != ' ')
		{
			for (j = i - count + 1; str[j] != '\0'; j ++)
			 str[j]=str[j + count - 1];
			i -= count;
			count = 0;
		}

	}
	cout << str << endl;
	return 0;
}


int main()
{
	char a[101];
	int n,i;
	gets(a);
	n=strlen(a);
	for(i=0;i<n;i++)
	{
		if(a[i]!=' ')
			printf("%c",a[i]);
		else
		{
			do
			{
				i+=1;
			}
			while(a[i]==' ');
			i=i-1;
			printf(" ");
		}
	}
return 0;
}


void main()
{
	char a[101];
	char *p=a;
	gets(a);
	for(p=a;*p!='\0';p++)
	{
		if(*p==' ')
		{
			if(*(p+1)==' ')continue;
			else printf("%c",*p);
		}
		else printf("%c",*p);
	}
}


int main()
{
	int count = 0, m;
	char sentence[101] = {0};
	char *p;
	cin.getline(sentence,100);
	p = sentence;
	m = strlen(sentence);
	while(p - sentence < m)
	{
		if(*p != ' ')
		{
			count = 0;
		}
		if(*p == ' ')
		{
			count ++;
		}
		if(count <= 1)
		{
			cout << *p;
		}
		p++;
	}
	return 0;
}


int main()
{
	int c;
	char getline[MAX];
	int i=0;
	int ex=IN;
	int line=0;
	while ((c=getchar())!='\n')
	{
		if (c!=' ')
		{
			ex=IN;
			getline[i]=c;
			++i;
		}
		else if ((c==' ')&&(ex==IN))
		{
			getline[i]=c;
			++i;
			ex=OUT;
		}
		else if ((c==' ')&&(ex==OUT))
			ex=OUT;
	}
	line=i;
	i=0;

	for (i=0;i<line;++i)
		putchar(getline[i]);

}


int main()
{
	char *p,a[100],flag=0;
	cin.getline(a,100,'\n');
	p=a;
	int l;
	l=strlen(a);
	for(p=a;p<a+l;p++)
	{
		if(*p==' '&&flag==0)
		{
			cout<<*p;
		}
		if(*p!=' ')
		{
			cout<<*p;
			flag=0;
		}
		else
		{
			flag++;
		}
	}
	cout<<endl;
	return 0;
}


int main(){
	char str[101];
	int i,p,n=0,j,end=0,duoyu=0;
	gets(str);
	p=strlen(str)+1;
	for(i=0;i<p;i++){
		if(str[i]==' '&&str[i+1]==' '){
			end++;
		}
	}
	for(i=0;i<p;i++){
		if(str[i]==' '&&str[i+1]==' '){
			duoyu++;
		}
		else if(str[i+1]!=' '){
			for(j=i;j<p;j++){
				str[j+1-duoyu]=str[j+1];
			}
			//printf("%s\n",str);
			//printf("%d\n",duoyu);
			i=i-duoyu;
			duoyu=0;
		}
	}
	//str[p-end]='\0';
	printf("%s",str);
	return 0;
}


int main()
{
    char str[100],str2[100];
    int i,j,l,sum;
    gets(str);
    l=strlen(str);
    j=0;
    sum=0;
    for(i=0;i<l;i++)
    {
            if(i==0&&str[i]==' ')
            continue;
            if(str[i]==' ')
            {
                         if(str[i+1]==' '||str[i+1]=='\0')
                         continue;
                         else
                         {
                             str2[j]=str[i];
                             j++;
                         }
            }
            else
            {
                str2[j]=str[i];
                j++;
            }

     }
     str2[j]='\0';
     puts(str2);
     getchar();
     getchar();
}


int main()
{
    char a[1000];
    gets(a);
    int k=0;
    int i,l;
    l=strlen(a);
    for(i=0;i<l;i++)
    {
                    if (a[i]!=' ')
                    {k=0;
                    printf("%c",a[i]);}
                    else
                    {
                         k++;
                         if (k==1)
                         printf("%c",a[i]);
                    }
    }
    getchar();
}


int main()
{
	int i,m;
	char str[101];
	cin.getline(str,101,'\n');
	m=strlen(str);
	for(i=0;i<m;i++)
		if(str[i]!=32||(str[i]==32&&str[i+1]!=32))
			cout<<str[i];
	return 0;
}


int main()
{
    char string[100];
    gets(string);
    int i,j;
    int num;
    int count=0;
    num=strlen(string);
    for(i=1;i<num;i++)
    {
                    if(string[i]==' '&&string[i-1]==' ')
                    {
                                    for(j=i;j<num;j++)
                                    {
                                    string[j]=string[j+1];
                                    }
                                    count++;
                                    string[num-count]='\0';
                                    i=i-1;
                    }

    }
    puts(string);
    return 0;
    }


int main()
{
    char str[200];
     int i,n;
    gets(str);

    n=strlen(str);
     for(i=0;i<n;i++)
      {
                    if((str[i])!=' ')
                    {
                                printf("%c",str[i]);
                                }
                    else if((str[i])==' ')
                    {
                         if((str[i+1])==' ')
                         continue;
                         else if((str[i+1])!=' ')
                         {
                              printf("%c",str[i]);
                              }
                         }

                    }

   return 0;
   }


int main()
{
	int i=0,n;
	char str[101];
	gets(str);
	n=strlen(str);
	do
	{if (str[i]==' ' && str[i-1]==' ')
		{i++;
		 continue;
		}
	 printf("%c",str[i]);
	 i++;
	}while(i<n);
	return 0;
}


int main(){
	char zfc[101];
	gets(zfc);
	int n=strlen(zfc);
	for(int i=0;i<n-1;i++){
		while(zfc[i]==zfc[i+1]&&zfc[i]==' ')
		{
			for(int j=i;j<=99;j++)
			{
				zfc[j]=zfc[j+1];
			}
		}
	}
	printf("%s",zfc);
	return 0;
}


int main()
{
    int len,i,k,a;
    char zf[101];
    gets(zf);
    len=strlen(zf);
    for(i=0,k=0;i<len;i++){
        if(zf[i]==' '&&zf[i+1]==' '){
           continue;
        }
        zf[k]=zf[i];
        k++;
    }
    zf[k]='\0';
    puts(zf);
    return 0;
}


int main()
{
	char input[200];
	char *a=input;
	int i;
	cin.getline(a,200,'\n');
	while(*a!='\0')
	{
		if(*(a-1)==' '&&*a==' ')
			a++;
		else
		{
			cout<<*a;
			a++;
		}
	}
	return 0;
}


int main(){
	char sen[100];
	cin.getline(sen,100);
	for(int i=0;i<strlen(sen);){
		if(sen[i]==' '){
			cout<<' ';
			for(int j=i+1;sen[j]==' ';){
				if(sen[j]==' '){
					j++;
					i++;
				}
			}
			i++;
		}
		else {
			cout<<sen[i];
			i++;
		}
	 }
	return 0;
}


void main()
{ char s[100];
	int i,j,n;
	gets(s);
	for(i=0;i<strlen(s);i++){
		if(s[i]!=' ')
		printf("%c",s[i]);
		else{
	if(s[i-1]==' ')
		continue;
		else printf("%c",s[i]);}}
}


int main()
{
	char str[100];
	int i,len,count,p,t,flag,m,sum=0;
	gets(str);
	len=strlen(str);
	for(t=0;t<len;t++)
	{
		if(str[t]!='\0')
		{
			for(i=0;i<len;i++)
			{
				count=0;
				if(str[i]==' ')
				{
					flag=1;
					for(p=i;p<len;p++)
					{
						if(str[p]==' ')
						{
							flag*=1;
							count+=1;
						}
						else
						{
							flag*=0;
							break;
						}
					}
					if(count>1)
						for(m=0;m<len;m++)
							str[i+1+m]=str[i+count+m];
				}

				if(count>1)
				{
					sum+=count-1;
					break;
				}
			}
		}
	}
	for(i=0;i<len-sum;i++)
		printf("%c",str[i]);
	printf("\n");
	return 0;
}


int main()
{
char shuzu[101]={0};
gets(shuzu);
int i=0,j=0;
for(i=0;i<101;)
{
	if(*(shuzu+i)==' '&&*(shuzu+i+1)==' ')
		{
		for(j=i;j<101;j++)
			*(shuzu+j)=*(shuzu+j+1);
		}
	else i++;
}
cout<<shuzu<<endl;
return 0;
}


int main(int argc, char* argv[])
{
char a[100];
int n,i;
gets(a);
n=strlen(a);
if(a[0]!=' ')printf("%c",a[0]);
for(i=1;i<n;i++){
if(a[i]!=' ')printf("%c",a[i]);
else{if(a[i-1]!=' ')printf("%c",a[i]);}}

return 0;
}


int main(void)
{
    char c;
    int k=-1;
    while(scanf("%c", &c)!=EOF)
    {
        if(!isspace(c))
            k=-1;
            else
            k++;
        if(isspace(c)&&k!=0)
            continue;
        printf("%c", c);
    }
    return 0;
}


/*
 * guolvkongge.cpp
 *
 *  Created on: 2011-1-8
 *      Author: Owner
 */

int main()
{
	char a[200];
	int i,j,k;
	int x,y;
	cin.getline(a,102);
	x=strlen(a);
	for(i=0;i<x;i++)
	{
		if(a[i]==' ')
		{
			for(j=i+1;j<x;j++)
			{
				if(a[j]!=' ')
				{
				    y=j;
				    break;
				}
			}
			int s=i;
			if(y-s>=2)
			{
				for(k=y;k<=x;k++)
					a[k-y+s+1]=a[k];
			}
		}
	}
	for(i=0;i<=x;i++)
	{
		if(a[i]=='\0')
			break;
	}
	int v=i;
	for(i=0;i<v;i++)
		cout<<a[i];
	return 0;
}


int main()
{
	char shuru[500];
	cin.getline(shuru,500);
	int i = 0, a = 0, j = 0;
	char *p = NULL;
	a = strlen(shuru);
	p = shuru;
	cout << shuru[0];
    for(i = 0; i <= a - 1; i++)
	{
		if(i >= 1)
		{
			if((shuru[i] == ' ' && shuru[i - 1] != ' ') || shuru[i] != ' ')
				cout << shuru[i];
		}
    }
	return 0;
}


int main()
{
	char a[100];
	int i, j, len, num = 0;
	gets(a);
	len = strlen(a);
	for (i = 0; i < len; i++)
	{
		while (a[i] == ' ')
		{
			num++;
			i++;
			if (a[i] != ' ')
			{
				for (j = i; j < len; j++)
				{
					a[j - num + 1] = a[j];
				}
				len = len - num + 1;
				a[len] = '\0';
				i = i - num + 1;
				num = 0;
			}

		}
	}
	for (i = 0; i < len; i++)
		cout << a[i];
	return 0;
}


int main()
{
	char a[100], *p;
	int i, count;
	cin.getline(a, 100);
	count = 0;
	for(p = a; *p != '\0'; p++)
	{
		if(p == a)
			continue;
		if(*p == ' ')
			count++;
		if(*p != ' ' && *(p - 1) == ' ')
		{
			count = count - 1;
			for(p = p - count, i = 0; ; i++)
			{
				p[i] = p[i + count];
				if(p[i] == '\0')
					break;
			}
			count = 0;
		}
	}
	cout << a << endl;
	return 0;
}


int main()
{
    char str[100];
    int i,l,s,m,j;
    gets(str);
    s=0;
    l=strlen(str);
    for(i=0;i<l-2;i++)
    for(s=0;s<l-i;s++)
    if(str[i]==' '&&str[i+1]==' ')
    for(j=i+1;j<l-s+1;j++)
    str[j]=str[j+1];
    printf("%s\n",str);
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
}


int main()
{
    char a[200];
    gets(a);
    int len=strlen(a);
    int i,j=0,flag=0;
    for(i=0;i<len;i++)
    {
        if(a[i]!=' ')
        {
            flag=0;
            printf("%c",a[i]);
        }
        else if(a[i]==' ')
        {
            if(flag==0)
            {
                flag=1;
                printf(" ");
            }
            else continue;
        }
       }

    printf("\n");
}


int main()
{
int i,j;
char str[101];
gets(str);
for(i=0;i<strlen(str);i++)
{
	if(str[i]==' ')
	{
		if(str[i+1]==' ')
		{
			for(j=i;j<=strlen(str);j++)
			{str[j]=str[j+1];
			}
			i--;
		}

	}

}
printf("%s",str);
}


int main( )
{ char a[105];
char *p=NULL;
 gets(a);
 for(p=a;*p!='\0';p++)
 { if(*p!=' ') cout<<*p;
 else
 { if(p[1]==' ') ;
 else cout<<*p;
 }
 }
 return 0;
}


double fangcheng(double a,double b,double c)
{
	double d,x1,x2,m,n;
	d=b*b-4*a*c;
	if(d>0)
	{
		x1=(-b+sqrt(d))/(2*a);
		x2=(-b-sqrt(d))/(2*a);
		printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	}
	else if (d==0)
	{
		x1=-b/(2*a);
		x2=-b/(2*a);
		printf("x1=x2=%.5lf\n",x1);
	}
	else if (d<0)
	{
		m=-b/(2*a);
		n=sqrt(-d)/(2*a);
		if(m==-0)
		{
			m=0;
		}
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	while(n>0)
	{
     double a,b,c;
	  scanf("%lf%lf%lf",&a,&b,&c);
      n=n-1;
	  fangcheng (a,b,c);
	}
	return 0;
}


char *solve_x(int xn, float a, float b, float c)
{
    double in_sqrt = b * b - 4 * a * c;
    double x;
    char *res;
    double real, imaginary;
    res = (char *)malloc(100 * sizeof(char));
    if (in_sqrt >= 0) {
        if (xn == 1) {
            x = (-b + sqrt(in_sqrt)) / (2 * a);
        } else {
            x = (-b - sqrt(in_sqrt)) / (2 * a);
        }
        sprintf(res, "%.05f", x);
        if (!strcmp(res, "-0.00000")) {
            res++;
        }
    } else {
        real = -b / (2 * a);
        imaginary = sqrt(-in_sqrt) / (2 * a);
        sprintf(res, "%.05f", real);
        if (!strcmp(res, "-0.00000")) {
            res++;
        }
        if (xn == 1) {
            sprintf(res + strlen(res), "+%.05fi", imaginary);
        } else {
            sprintf(res + strlen(res), "-%.05fi", imaginary);
        }
    }
    return res;
}

int main()
{
    int n;
    double a, b, c;
    char *x1, *x2;
    scanf("%d", &n);
    while (n--) {
        scanf("%lf %lf %lf", &a, &b, &c);
        x1 = solve_x(1, a, b, c);
        x2 = solve_x(2, a, b, c);
        if (!strcmp(x1, x2)) {
            printf("x1=x2=%s\n", x1);
        } else {
            printf("x1=%s;x2=%s\n", x1, x2);
        }
    }
    return 0;
}


void main()
{ int n;
 double a,b,c,disc,x1,x2,realpart,imagpart;
 scanf("%d",&n);
 while(n--)
   {scanf("%lf %lf %lf",&a,&b,&c);
    disc=b*b-4*a*c;
	if(disc==0.0)
	{ printf("x1=x2=%.5lf\n",-b/(2.0*a));}

   else  {if(disc>0.0)
   {x1=(-b+sqrt(disc))/(2.0*a);
	     x2=(-b-sqrt(disc))/(2.0*a);
	      printf("x1=%.5lf;",x1);
		  printf("x2=%.5lf\n",x2);}
	     else
		 {realpart=-b/(2.0*a);
		  imagpart=sqrt(-disc)/(2.0*a);
		  printf("x1=%.5lf+%.5lfi;",realpart,imagpart);
		  printf("x2=%.5lf-%.5lfi\n",realpart,imagpart);} }
    }
}


int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int i;
	double a,b,c;
	double A[999],B[999],C[999];
	double delta,x1,x2;
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&A[i],&B[i],&C[i]);
	}
	for(i=0;i<n;i++)
	{
		a=A[i];
		b=B[i];
		c=C[i];
		delta=b*b-4*a*c;
		if(delta>0)
		{
			x1=(-b+sqrt(delta))/(2*a);
			x2=(-b-sqrt(delta))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(delta==0)
		{
			x1=x2=(-b)/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else if(delta<0)
		{
			double shibu,xubu;
			shibu=(-b)/(2*a);
			xubu=sqrt(-delta)/(2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",shibu,xubu,shibu,xubu);
		}
	}
	return 0;
}


void main(){
	int n, j;
	double a, b, c, delta, o[100], p[100], q[100], realpart, imagpart, x1, x2;
	scanf("%d", &n);
	for (j=0; j<n; j++)
	{
	scanf("%lf %lf %lf", &o[j], &p[j], &q[j]);
	}
	for (j=0; j<n; j++)
	{
    a=o[j];
	b=p[j];
	c=q[j];
	delta=b*b-4*a*c;
    	if (delta > pow(10, -8))
		{
	    x1=(-b+sqrt(delta))/(2*a);
	    x2=(-b-sqrt(delta))/(2*a);
        printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
    	else if (fabs(delta) <= pow(10, -8))
		{
		x1=x2=-b/(2*a);
		printf("x1=x2=%.5lf\n", x1, x1);
		}
    	else
		{
		realpart=-b/(2*a);
		if (realpart==0)
			realpart=fabs(realpart);
		imagpart=sqrt(-delta)/(2*a);
        printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", realpart, imagpart, realpart, imagpart);
		}
	}
}


int main()
{
	int num;
	float a, b, c;
	double x1, x2, tmp, m, n;
	int i;

	cin >> num;
	for(i = 0; i < num; i ++)
	{
		cin >> a >> b >> c;
		tmp = b * b - 4 * a * c;
		if (tmp > 0)
		{
			x1 = ( - b + sqrt(b * b - 4 * a * c)) / (2 * a);
			x2 = ( - b - sqrt(b * b - 4 * a * c)) / (2 * a);
			cout << "x1=" << fixed << setprecision(5) << x1;
			cout << ";x2=" << fixed << setprecision(5) << x2 << endl;
		}
		else if(tmp == 0)
		{
			x1 = ( - b ) / (2 * a);
			cout << "x1=x2=" << fixed << setprecision(5) << x1 << endl;
		}
		else
		{
			if (b != 0)
				m = ( - b) / (2 * a);
			else
				m = b / (2 * a);
			n = (sqrt( - tmp)) / (2 * a);
			cout << "x1=" << fixed << setprecision(5) << m;
			cout << "+" << fixed << setprecision(5) << n << "i;";
			cout << "x2=" << fixed << setprecision(5) << m;
			cout << "-" << fixed << setprecision(5) << n << "i";
			cout << endl;
		}
	}

	return 0;
}


double x1, x2;
void cal(double a, double b, double c)
{
	double deta = b * b - 4 * a * c;
	if (deta > 0)
	{
		x1 = (- b + sqrt(deta)) / (2 * a);
		x2 = (- b - sqrt(deta)) / (2 * a);
		cout << fixed << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;
	}
	else
	{
		if (deta == 0)
		{
			if(b == 0)
				x1 = 0;
			else
				x1 = - b / (2 * a);
			cout <<fixed << setprecision(5)<< "x1=x2=" << x1 << endl;
		}
		else
		{
			x1 = sqrt(-deta) / (2 * a);
			if(b == 0)
				x2 = 0;
			else
				x2 = - b / (2 * a);
			cout <<fixed << setprecision(5)<< "x1=" << x2 <<"+" << x1 << "i;x2=" <<x2
				<<"-"<<x1<<"i" << endl;
		}
	}
}

int main()
{
	int n, i;
	double a, b, c;
	cin >> n;
	for(i = 0; i < n; i++)
	{
		cin >> a >> b >> c;
		cal(a,b,c);
	}
	return 0;
}


void jie(float a,float b,float c)
{
     float p,disc,q,x1,x2;
     if (b/(2*a)!=0)
     p=-b/(2*a);
     else
     p=b/(2*a);
     disc=b*b-4*a*c;
      if (disc==0)
      printf("\nx1=x2=%5.5f\n",p);
      else
      if (disc>=0)
      {q=sqrt(disc)/(2*a);
  		x1=p+q;x2=p-q;
        printf("\nx1=%5.5f;x2=%5.5f\n",x1,x2);}
      else
      {q=sqrt(-disc)/(2*a);
      printf("\nx1=%5.5f+%5.5fi;x2=%5.5f-%5.5fi\n",p,q,p,q);}
     }
int main()
{   float *a,*b,*c;
    int n,i;
    scanf ("%d",&n);
    a= (float*)malloc(n*sizeof(float)) ;
    b= (float*)malloc(n*sizeof(float)) ;
    c= (float*)malloc(n*sizeof(float)) ;
    for (i=1;i<=n;i++)
    scanf ("%f %f %f",&a[i],&b[i],&c[i]);
    for (i=1;i<=n;i++)
         jie(a[i],b[i],c[i]);
     return 0;
    }


main()
{
      float a,b,c,disc;
      double x1,x2,realpart,imagpart;
      int i,n;
      scanf("%d",&n);
      for(i=1;i<=n;i=i+1)
      {
      scanf("%f%f%f",&a,&b,&c);
      disc=b*b-4*a*c;
      if(fabs(disc)<=1e-6)
        printf("x1=x2=%.5f\n",-b/(2*a)+0);
        else

          if(disc>1e-6)
          {
          realpart=-b/(2*a)+0;
          imagpart=sqrt(disc)/(2*a);
           x1=realpart+imagpart;
           x2=realpart-imagpart;
           if(fabs(x1)<=1e-6)
           printf("x1=%.5f;x2=%.5f\n",fabs(x1),x2);
            else
            printf("x1=%.5f;x2=%.5f\n",x1,x2);

          }
          else
          {
          realpart=-b/(2*a)+0;
          imagpart=sqrt(-disc)/(2*a);
          printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart,imagpart,realpart,imagpart);

          }
          }
          }


int main()
{
	double n, x1, x2, a, b, c, i, delta;
	cin >> n;
	for (i = 1; i <= n; i ++)
	{
		cin >> a >> b >> c;
		delta = b * b - 4 * a * c;
		if (delta == 0)
		{
			x1 = x2 = (double)(- b / (2 * a));
			printf("x1=x2=%.5lf\n", x1);
		}
		else if(delta > 0)
		{
			x1 = (double)(-b + sqrt(delta))/(2 * a);
			x2 = (double)(-b - sqrt(delta))/(2 * a);
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if (delta < 0)
		{
			delta = - delta;
			double i, x;
			i = sqrt(delta) / (2 * a);
			x = -b / (2 * a);
			if (x == - 0)
				x = 0;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", x, i, x, i);
		}
	}
	return 0;
}


//?????????

int main()
{
	int n, i;
	double a, b, c, x1, x2, real, imaginary;

	scanf ("%d", &n);
	for (i=1; i<=n; i++){
		scanf("%lf %lf %lf", &a, &b, &c);

		if((b*b-4*a*c)>0){
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
			x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if((b*b-4*a*c)==0){
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
			printf("x1=x2=%.5lf\n", x1);
		}
		else{
			imaginary=(sqrt(-b*b+4*a*c))/(2*a);
			real=(-b/(2*a))+1-1;
			if(imaginary>=0){
				printf("x1=%.5lf+%.5lfi;", real, imaginary);
				printf("x2=%.5lf-%.5lfi\n", real, imaginary);
			}
			else{
				imaginary=(-imaginary);
				printf("x1=%.5lf-%.5lfi;", real, imaginary);
				printf("x2=%.5lf+%.5lfi\n", real, imaginary);
			}
		}
	}

	return 0;
}


int main()
{int i,n;
float a,b,c,d;
double disc,x1,x2,rpart,ipart;
scanf("%d",&n);
for(i=1;i<=n;i++)

{scanf("%f %f %f",&a,&b,&c);
disc=b*b-4*a*c;
d=-b/(2*a);
if(fabs(disc)<=1e-6)
{printf("x1=x2=%.5lf\n",d);
}
else
if(disc>1e-6)
{x1=(-b+sqrt(disc))/(2*a);
x2=(-b-sqrt(disc))/(2*a);
printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
}
else
{rpart=-b/(2*a);
ipart=sqrt(-disc)/(2*a);
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",rpart,ipart,rpart,ipart);
}
}
return 0;
}


int main()
{
	int number;
	float a, b, c;
	double delta=0;
	scanf("%d",&number);
	while ( number -- )
	{
		scanf("%f %f %f", &a, &b, &c);
		delta = b*b-4*a*c;
		if ( delta > 0 )
		{
			double x1,x2;
			x1 = (-b + sqrt(delta))/(2*a);
			x2 = (-b - sqrt(delta))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else
		{
			if ( delta == 0 )
			{
				double x = (-b)/(2*a);
				printf("x1=x2=%.5f\n", x);
			}
			else
			{
			delta = -delta;if(b==0){double xfront=b/(2*a);

				double xbehind = sqrt(delta)/(2*a);
				printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", xfront, xbehind, xfront, xbehind);}else{		double xfront = (-b)/(2*a);double xbehind = sqrt(delta)/(2*a);printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", xfront, xbehind, xfront, xbehind);}
			}
		}
	}
}


int main(){
  int n;
  cin >> n;
  double a,b,c,delta;
  for (int i=1; i<=n ;++i){
         cin >> a >> b >> c;
         delta = b*b - 4*a*c;
         if (delta == 0){
           cout << "x1=x2=";
           printf("%.5f", (-b)/(2*a));
           }
         if (delta > 0 ){
                     cout << "x1=";
                     printf("%.5f", (-b + sqrt(b*b-4*a*c))/(2*a));
                     cout << ";x2=";
                     printf("%.5f", (-b - sqrt(b*b-4*a*c))/(2*a));
                   }
         if (delta < 0){
                     delta = -delta;
                     double shi,xu;
                     shi = (-b)/(2*a); xu = (sqrt(delta))/(2*a);
                     if (shi == 0) shi=0;
                     cout << "x1=";
                     printf("%.5f", shi);
                     cout << "+";
                     printf("%.5f", xu);
                     cout << "i;";
                     cout << "x2=";
                     printf("%.5f", shi);
                     cout << "-";
                     printf("%.5f", xu);
                     cout << "i" ;
                   }
         cout << endl;
      }
  return 0;
}


int main()
{
    int n;
    scanf("%d", &n);
    int i;
    double a, b, c, delta;
    double x1, x2;
    double shi1, xu1, shi2, xu2;
    for(i=1;i<=n;i++)
    {
        scanf("%lf%lf%lf", &a, &b, &c);
        delta=b*b-4*a*c;
        if(delta>=0)
        {
            x1=(-b+sqrt(delta))/(2*a);
            x2=(-b-sqrt(delta))/(2*a);
            if(x1!=x2)
            printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
            if(x1==x2)
            printf("x1=x2=%.5lf\n", x2);
        }
        if(delta<0)
        {
            shi1=shi2=-b/(2*a);
            xu1=sqrt(-delta)/(2*a);
            xu2=-sqrt(-delta)/(2*a);
            printf("x1=%.5lf", shi1);
            if(xu1>0)
            printf("+%.5lfi", xu1);
            if(xu1<0)
            printf("%.5lfi", xu1);
            printf(";x2=%.5lf", shi2);
            if(xu2>0)
            printf("+%.5lfi", xu2);
            if(xu2<0)
            printf("%.5lfi\n", xu2);
        }
    }

    return 0;
}


int main()
{
	int n;
	float a,b,c;
	cin>>n;
	for(n;n>0;n--)
	{
		cin>>a>>b>>c;
		double m=-b/(2*a);
		double deta=b*b-4*a*c;
		if (m==-0)
			m=0;
		if(deta>1e-8)
			cout<<"x1="<<fixed<<setprecision(5)<<m+sqrt(deta)/(2*a)
				<<";x2="<<m-sqrt(deta)/(2*a)<<endl;
		else if(deta<=-1e-8)
			cout<<"x1="<<fixed<<setprecision(5)<<m<<"+"<<fabs(sqrt(-deta)/(2*a))<<"i"
			    <<";x2="<<m<<"-"<<fabs(sqrt(-deta)/(2*a))<<"i"<<endl;
		else
			cout<<fixed<<setprecision(5)<<"x1=x2="<<m<<endl;
	}

	return 0;
}


int main()
{
	double a,b,c,delta,m,n;
	int i = 0;
	scanf("%d",&i);
	while(i--)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		delta=b*b-4*a*c;

		if(delta<0)
		{
			m=-b/2/a;
			n=sqrt(-delta)/2/a;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
		}
		else
			if(delta==0)
			{
				m=-b/2/a;
				printf("x1=x2=%.5lf\n",m);
			}
			else
			{
				m=-b/2/a;
				n=sqrt(delta)/2/a;
				printf("x1=%.5lf;x2=%.5lf\n",m+n,m-n);
			}
	}
	return 0;
}


int main()
{
    int n;
    scanf("%d", &n);
    while(n--){
        double a, b, c;
        scanf("%lf%lf%lf", &a, &b, &c);
        double d = b*b-4*a*c;
        double mid = -b/(2*a);
        double dif = sqrt(fabs(d))/(2*a);
        if(mid == 0)mid = 0;
        if(d > 0)printf("x1=%.5f;x2=%.5f\n", mid+dif, mid-dif);
        if(d == 0)printf("x1=x2=%.5f\n", mid);
        if(d < 0)printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", mid, fabs(dif), mid, fabs(dif));
    }
    return 0;
}


int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
	double a,b,c;
	cin>>a>>b>>c;
	double delta=b*b-4*a*c;
	double x1,x2;
	if(delta>0)
	{
	x1 = (-b + sqrt(b*b-4*a*c))/(2*a) ;
x2 = (-b - sqrt(b*b-4*a*c))/(2*a) ;
cout<<fixed<<setprecision(5)<<"x1="<<x1<<";x2="<<x2<<endl;
}
else if(delta==0)
{
	cout<<fixed<<setprecision(5)<<"x1=x2="<<(-b/(2*a))<<endl;
}
else if(delta<0)
{
	if(-b/(2*a)==-0) b=-b;
	delta=-delta;
		cout<<fixed<<setprecision(5)<<"x1="<<-b/(2*a)<<"+"<<sqrt(delta)/(2*a)<<"i;x2="<<-b/(2*a)<<"-"<<sqrt(delta)/(2*a)<<"i"<<endl;

}
}

return 0;
}


int main()
{
    int n,i;
    scanf("%d",&n);
    double a,b,c,disc,x1,x2,realpart,imagpart;
    for(i=1;i<=n;i++)
    {
    scanf("%lf %lf %lf",&a,&b,&c);
    disc=b*b-4*a*c;
    if(fabs(disc)<=1e-6)
      {
              x1=-b/(2*a);
              x2=-b/(2*a);
              printf("x1=x2=%7.5f\n",x1);
      }
    else
    if(disc>1e-6)
    {
               x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
               x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
               printf("x1=%7.5f;x2=%7.5f\n",x1,x2);
    }
    else
    {
        realpart=-b/(2*a);
        imagpart=sqrt(-disc)/(2*a);
        if(realpart==0)
        printf("x1=0.00000+%7.5fi;x2=0.00000-%7.5fi\n",imagpart,imagpart);
        else
        printf("x1=%7.5f+%7.5fi;x2=%7.5f-%7.5fi\n",realpart,imagpart,realpart,imagpart);
    }
    }
    return 0;
}


int main(void)
{
	int n;
	double a, b, c, delta, x1, x2, img, rl;
	cin >>n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a >> b >> c;
		delta = b * b - 4 * a * c;
		if (delta > 0)
		{
			x1 = (-b + sqrt(delta))/(2 * a);
			x2 = (-b - sqrt(delta))/(2 * a);
			cout << fixed << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else if (delta == 0)
		{
			x1 = (-b)/(2*a);
			cout << fixed << setprecision(5) << "x1=x2=" << x1 << endl;
		}
		else
		{
			img = sqrt(-delta) / (2 * a);
			rl = (-b) / (2 * a);
			if (rl != 0)
			{
				cout << fixed << setprecision(5) << "x1=" << rl << "+" << img << "i;";
				cout << fixed << setprecision(5) << "x2=" << rl << "-" << img << "i" << endl;
			}
			else
			{
				cout << fixed << setprecision(5) << "x1=" << "0.00000" << "+" << img << "i;";
				cout << fixed << setprecision(5) << "x2=" << "0.00000" << "-" << img << "i" << endl;
			}
		}
	}
	return 0;
}


int main() {
	int n;
	cin >>n;
	for (;n>0;n=n-1)
	{
		double a,b,c,d,x1,x2,x1re,x1im,x2re,x2im;//a,b,c are the output.  d is the discriminant.
		cin >>a>>b>>c;
		d=b*b-4*a*c;
		if (d>=0)
		{
			if(b!=0)//used to avoid the output of -0.00000+...
		    {
			x1=(-b+sqrt(d))/(2*a);
		    x2=(-b-sqrt(d))/(2*a);
		          if (x1!=x2)
		          {
		                cout <<fixed<<setprecision(5)<<"x1="<<x1;
		                cout <<";";
		                cout <<fixed<<setprecision(5)<<"x2="<<x2<<endl;
		           }
		          else
		                cout <<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
            }
			else//used to avoid the output of -0.00000+...
		    {
			x1=(sqrt(d))/(2*a);
			x2=(sqrt(d))/(2*a);
			      if (x1!=x2)
			      {
					    cout <<fixed<<setprecision(5)<<"x1="<<x1;
					    cout <<";";
					    cout <<fixed<<setprecision(5)<<"x2="<<x2<<endl;
				  }
				  else
					    cout <<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
		     }
		}

		else
		{
			if(b!=0)//used to avoid the output of -0.00000+...
			{
				x1re=-b/(2*a);
				x2re=-b/(2*a);
				x1im=(sqrt(-d))/(2*a);
				x2im=-(sqrt(-d))/(2*a);
				cout <<noshowpos<<fixed<<setprecision(5)<<"x1="<<x1re<<showpos<<x1im<<"i";//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
				cout <<";";
				cout <<noshowpos<<fixed<<setprecision(5)<<"x2="<<x2re<<showpos<<x2im<<"i"<<endl;//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
			}
			else//used to avoid the output of -0.00000+...
			{
				x1re=0;
				x2re=0;
				x1im=(sqrt(-d))/(2*a);
				x2im=-(sqrt(-d))/(2*a);
				cout <<noshowpos<<fixed<<setprecision(5)<<"x1="<<x1re<<showpos<<x1im<<"i";//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
				cout <<";";
				cout <<noshowpos<<fixed<<setprecision(5)<<"x2="<<x2re<<showpos<<x2im<<"i"<<endl;//ensure that the real part don`t have a "+" before ,while the sign of imaginary part is shown
			}
		}
	}
	return 0;
}


int main()
{
	int n,i;
	double a,b,c,disc,x1,x2,realpart,imagpart;
	scanf("%d",&n);
	i=0;

	while(i<n)

	{
	 scanf("%lf %lf %lf",&a,&b,&c);
     if(fabs(a)<=1e-6)
		 printf("error\n",a);
     else
	 { disc=b*b-4*a*c;
	   if(fabs(disc)<=1e-6)
		   printf("x1=x2=%.5lf\n",-b/(2*a));
	   else
	   {
		   if(disc>1e-6)
		   {
			   x1 = (-b + sqrt(disc))/(2*a);
               x2 = (-b - sqrt(disc))/(2*a);
           printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		   }
		   else
		   {
			   realpart=-b/(2*a);
			   imagpart=sqrt(-disc)/(2*a);
			   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",realpart,imagpart,realpart,imagpart);

		   }
	   }
	 }

      i++;

    }

	return 0;
}


int main()
{
	int n;
	scanf("%d\n",&n);

	int i;
	i=1;
	do
	{ double a,b,c;
	scanf("%lf%lf%lf\n",&a,&b,&c);
	double x1,x2,disc,realpart,imagpart;
		disc=b*b-4*a*c;
	if(fabs(disc)<=1e-6)
	printf("x1=x2=%.5f\n",-b/(2*a));
	else if(disc>1e-6)
	{
		x1=(-b+sqrt(disc))/(2*a);
		x2=(-b-sqrt(disc))/(2*a);
		printf("x1=%.5f;x2=%.5f\n",x1,x2);
	}
	else
	{
	realpart=-b/(2*a);
	imagpart=sqrt(-disc)/(2*a);
    if(b==0) printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",b,imagpart,b,imagpart);
	else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart,imagpart,realpart,imagpart);
	}
		i++;
	}
	while(i<=n);

}


int main()
{
	int n, i;
	double a, b, c;
	double x1, x2, real,imaginary;
	scanf("%d", &n);
    double temp;

	for( i=0; i<n; i++)
	{
		scanf("%lf%lf%lf", &a, &b, &c);
		temp = b*b - 4*a*c;
			if( temp >0 )
		{
			x1 = (-b+sqrt(temp))/(2*a);
			x2 = (-b-sqrt(temp))/(2*a);
          printf("x1=%.5f;x2=%.5f\n", x1, x2);
		}
		else if( temp == 0 )
		{
			x1 = -b/(2*a);
         printf("x1=x2=%.5f\n", x1);

		}
		else
		{
			real =-b/(2*a);
			imaginary = sqrt(-temp)/(2*a);
            printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", real, imaginary, real, imaginary);

		}
	}
}


int main()
{int n,i;
double a,b,c,x1,x2,delta,p,q;
cin>>n;
for (i=1;i<=n;i++)
{
cin>>a>>b>>c;
delta=b*b-4*a*c;
if (delta>0)
{x1= (-b + sqrt(delta))/(2*a) ;
 x2 = (-b - sqrt(delta))/(2*a);
 cout<<"x1="<<fixed<<setprecision(5)<<x1<<";"<<"x2="<<fixed<<setprecision(5)<<x2<<endl;
}
if (delta==0)
{x1=(-b)/(2*a);
 cout<<"x1=x2="<<fixed<<setprecision(5)<<x1<<endl;
}
if (delta<0)
{p=(-b)/(2*a);
 q=sqrt(-delta)/(2*a);
 if (b==0)
 {p=0;
 }
 cout<<"x1="<<fixed<<setprecision(5)<<p<<"+"<<fixed<<setprecision(5)<<q<<"i;"<<"x2="<<fixed<<setprecision(5)<<p<<"-"<<fixed<<setprecision(5)<<q<<"i"<<endl;
}
}
return 0;
}


int main()
{
	int i,n;
	double a,b,c,x1,x2,disk,l[100],p[100],q[100],realpart,imagpart;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&l[i],&p[i],&q[i]);
	}
	for(i=0;i<n;i++)
	{
		a=l[i];
		b=p[i];
		c=q[i];
		disk=b*b-4*a*c;
		if(disk>0)
		{
			x1 = (-b + sqrt(disk))/(2*a);
            x2 = (-b - sqrt(disk))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else if(disk==0)
		{
            x2 = (-b - sqrt(disk))/(2*a);
			printf("x1=x2=%.5f\n",x2,x2);
		}
		else
		{
			realpart= (-b)/(2*a);
            if(realpart==0) realpart=fabs(realpart);
            imagpart= fabs(sqrt(-disk)/(2*a));
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",realpart,imagpart,realpart,imagpart);
		}
	}
	return 0;
}


int main()
{
	int n;
	double a, b, c, delta;
	double real1, real2, i1, i2, x1, x2;
	int zero(double a);
	scanf("%d", &n);
	while (n > 0)
	{
		scanf("%lf %lf %lf", &a, &b, &c);
		delta = b * b - 4 * a * c;
		if (zero(delta) == 1)
		{
			x1 = (-b + sqrt(delta)) / (2 * a);
			x2 = (-b - sqrt(delta)) / (2 * a);
//			if (!zero(x1)) x1 = 0;
//			if (!zero(x2)) x2 = 0;
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if (zero(delta) == 0)
		{
			x1 = (-b + sqrt(delta)) / (2 * a);
//			if (!zero(x1)) x1 = 0;
			printf("x1=x2=%.5lf\n", x1);
		}
		else
		{
			delta = -delta;
			real1 = -b / (2 * a);
			real2 = -b / (2 * a);
			i1 =  sqrt(delta) / (2 * a);
			i2 =  sqrt(delta) / (2 * a);
//			if (!zero(real1)) real1 = 0;
//			if (!zero(real2)) real2 = 0;
//			if (!zero(i1)) i1 = 0;
//			if (!zero(i2)) i2 = 0;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", real1, i1, real2, i2);
		}
		n--;
	}
	return 0;
}
int zero(double a)
{
	if (fabs(a) > 1e-6)
		if (a > 0) return 1;
		else return -1;
	else return 0;
}


int main()
{
	short task_number,i;
	double a,b,c,x1,x2,delta,real,image;
	scanf("%d",&task_number);
	for(i=1;i<=task_number;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		delta=b*b-4.0*a*c;
		if(fabs(delta)<1E-5)
		{
			x1=-b/(2.0*a);
			if(fabs(x1)<1E-5)	x1=0.0;
			printf("x1=x2=%.5lf\n",x1);
		}
		else
		{
			if(delta>0)
			{
				x1=(-b+sqrt(delta))/(2*a);  if(fabs(x1)<1E-5)	x1=0.0;
				x2=(-b-sqrt(delta))/(2*a);  if(fabs(x2)<1E-5)	x2=0.0;
				printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
			}
			else
			{
				real=-b/(2*a);
				if(fabs(real)<1E-5)		real=0.0;
				image=sqrt(-delta)/(2*a);
				if(fabs(image)<1E-5)	image=0.0;
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",real,image,real,image);
			}
		}
	}
	return(0);
}


int main()

{
	int n;
	double a, b, c;
	double delta, x1, x2, real_figure, unreliable_figure; //??????delta????real_figure?????unreliable_figure??
	cin >> n; //???????

	for(int i = 1; i <= n; i++) //??n??????????
	{
		cin >> a >> b >> c;
		delta = b * b - 4 * a * c; //??delta

		if(delta >= 0) //??delta????????????????????
		{
			x1 = (-b + sqrt(delta))/(2 * a);
			x2 = (-b - sqrt(delta))/(2 * a); //?????x1?x2

			if(x1 == x2) //?????????????????
				cout << fixed << setprecision(5) << "x1=x2=" << x2 << endl;
			else //????????????????
				cout << fixed << setprecision(5) << "x1=" << x1 << ";x2=" << x2 << endl;
		}
		else //delta??????????????
		{
			real_figure = b / (2 * a);
			if(real_figure != 0)
				real_figure = -real_figure;
			unreliable_figure = sqrt(-delta) / (2 * a);
			cout << fixed << setprecision(5);
			//????????????????
			cout << "x1=" << real_figure << "+" << unreliable_figure << "i;x2=" << real_figure << "-" << unreliable_figure << "i" << endl;
		}
	}
	return 0;
}


int main()
{int i,n;
 cin>>n;
 double a,b,c,sum,del;
 for(i=0;i<n;i++)
{cin>>a>>b>>c;
 del=b*b-4*a*c;
if(del==0)
cout<<"x1=x2="<<fixed<<setprecision(5)<<-b/2/a<<endl;
if(del>0)
cout<<"x1="<<fixed<<setprecision(5)<<(-b+sqrt(del))/2/a<<";"<<"x2="<<fixed<<setprecision(5)<<(-b-sqrt(del))/2/a<<endl;
if(del<0)
{if (b!=0)
cout<<"x1="<<fixed<<setprecision(5)<<-b/2/a<<"+"<<fixed<<setprecision(5)<<sqrt(-del)/2/a<<'i'<<";""x2="<<fixed<<setprecision(5)<<-b/2/a<<"-"<<fixed<<setprecision(5)<<sqrt(-del)/2/a<<'i'<<endl;
if (b==0)
cout<<"x1="<<0.00000<<"+"<<fixed<<setprecision(5)<<sqrt(-del)/2/a<<'i'<<";"<<"x2="<<0.00000<<"-"<<fixed<<setprecision(5)<<sqrt(-del)/2/a<<'i'<<endl;}
}
return 0;}


void  gen(double a,double b,double c);
int main()
{
	double *a,*b,*c;
	int n,i;
	scanf("%d",&n);
	a=(double*)malloc(n*sizeof(double));
    b=(double*)malloc(n*sizeof(double));
    c=(double*)malloc(n*sizeof(double));
	for(i=0;i<=n-1;i++)
	{
		scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		gen(a[i],b[i],c[i]);
	}
	free(a);
	free(b);
	free(c);
	return 0;
}

void gen(double a,double b,double c)
{
	double d,x1,x2,i1;
    d=b*b-4*a*c;
		if(d>0)
		{
			x1=(0-b+sqrt(d))/(2*a);
			x2=(0-b-sqrt(d))/(2*a);
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else
		{
		    if (d==0) printf("x1=x2=%.5f\n",(0-b)/(2*a));
		    else
		    {
			    x1=(0-b)/(2*a);
			    i1=(sqrt(0-d))/(2*a);
			    printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,i1,x1,i1);
		    }
	    }
}


 int main()
 {
	 int n,i,j;
	 scanf("%d",&n);
	 struct data{
		 double a,b,c;
	 }*datas;
	 datas=(struct data*)malloc(sizeof(data)*n);
	 for (i=0;i<n;i++)
	 {
		 scanf("%lf%lf%lf",&datas[i].a,&datas[i].b,&datas[i].c);
	 }
	 double *x1,*x2;
	 x1=(double*)malloc(sizeof(double)*n);
	 x2=(double*)malloc(sizeof(double)*n);
	 for (j=0;j<n;j++)
	 {
		 if ((datas[j].b*datas[j].b-4*datas[j].a*datas[j].c)>0)
		 {
			 x1[j]=(-datas[j].b+sqrt(datas[j].b*datas[j].b-4*datas[j].a*datas[j].c))/(2*datas[j].a);
			 x2[j]=(-datas[j].b-sqrt(datas[j].b*datas[j].b-4*datas[j].a*datas[j].c))/(2*datas[j].a);
		     printf("x1=%.5f;x2=%.5f\n",x1[j],x2[j]);
		 }
		 else if ((datas[j].b*datas[j].b-4*datas[j].a*datas[j].c)==0)
		 {
			 x1[j]=(-datas[j].b)/(2*datas[j].a);
			 printf("x1=x2=%.5f\n",x1[j]);
		 }
		 else if ((datas[j].b*datas[j].b-4*datas[j].a*datas[j].c)<0)
		 {
			 x1[j]=(-datas[j].b)/(2*datas[j].a);
			 double x=0;
			 x=sqrt((-1)*(datas[j].b*datas[j].b-4*datas[j].a*datas[j].c))/(2*datas[j].a);
			 if (x1[j]==0)
			 {
				 printf("x1=0.00000+%.5fi;x2=0.00000-%.5fi\n",x,x);
			 }
			 else if (x1[j]!=0)
			 {
				 printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1[j],x,x1[j],x);
			 }
		 }
	 }
	 return 0;
 }


int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		float a,b,c;
		cin>>a>>b>>c;
		double delta=b*b-4*a*c;
		cout<<fixed<<setprecision(5);
		if(delta>0)
		{
			double x1=(-b+sqrt(delta))/(2*a);
			double x2=(-b-sqrt(delta))/(2*a);
			if(x1==-0.0) x1=0.0;
			if(x2==-0.0) x2=0.0;
			cout<<"x1="<<x1<<";x2="<<x2<<endl;
			continue;
		}
		if(delta==0)
		{
			double x=-b/(2*a);
			if(x==-0.0) x=0.0;
			cout<<"x1=x2="<<x<<endl;
			continue;
		}
		if(delta<0)
		{
			double re=-b/(2*a);
			double im=sqrt(-delta)/(2*a);
			if(re==-0.0) re=0.0;
			cout<<"x1="<<re<<"+"<<im<<"i;x2="<<re<<"-"<<im<<"i"<<endl;
		}
	}
 	return 0;
}


int main()
{
	int n,i=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{	float a,b,c,d;
       double disc,x1,x2,realpart,imagpart;
	scanf ("%f%f%f",&a,&b,&c);
	disc=b*b-4*a*c;
	if(fabs(disc)==0)
		printf("x1=x2=%.5f\n",-b/(2*a));
	else if (disc>0)
	{x1=(-b+sqrt(disc))/(2*a);
	x2=(-b-sqrt(disc))/(2*a);
	printf ("x1=%.5f;x2=%.5f\n",x1,x2);
	}
	else
	{realpart=-b/(2*a);
	imagpart=sqrt(-disc)/(2*a);
	printf("x1=%.5f+%.5fi;",realpart,imagpart);
	printf("x2=%.5f-%.5fi\n",realpart,imagpart);
	}
	}
	return 0;
}


int main()
{
    double a, b, c, delta, x1, x2;
    int n;
    scanf("%d", &n );
    while( n-- ) {
        scanf("%lf %lf %lf", &a, &b, &c );
        delta = b * b - 4 * a * c;
        if( delta < 0 ) {
            delta = sqrt(-delta) / 2 / a;
            printf("x1=%.5lf+%.5lfi;x2=%.5lf%.5lfi\n", -b/2/a, delta, -b/2/a, -delta );
        } else if( delta > 0 ){
            delta = sqrt(delta)/2/a;
            printf("x1=%.5lf;x2=%.5lf\n", -b/2/a+delta, -b/2/a-delta );
        } else {
            printf("x1=x2=%.5lf\n", -b/a/2 );
        }
    }
}


int main()
{
	int n;
	cin >> n;
	float formal[n][3];
	for (int i = 0; i < n; i++)
		cin >> formal[i][0] >> formal[i][1] >> formal[i][2];
	double x1,x2,delta,unfi;
	for (int i = 0; i < n; i++)
	{
		delta = formal[i][1] * formal[i][1] - (4 * formal[i][0] * formal[i][2]);
		if (delta > 0)
		{
			x1 = (-formal[i][1] + sqrt(delta)) / (2 * formal[i][0]);
			x2 = (-formal[i][1] - sqrt(delta)) / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			else if (x2== -0)
				x2 = 0;
			cout<<fixed;
			cout << "x1=" << setprecision(5) << x1 << ";x2=" << x2 << endl;
		}
		else if (delta == 0)
		{
			x1 = -formal[i][1] / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			cout<<fixed;
			cout << "x1=x2=" << setprecision(5) << x1<<endl;
		}
		else
		{
			unfi = abs(sqrt(-delta) / (2 * formal[i][0]));
			x1 = -formal[i][1] / (2 * formal[i][0]);
			if (x1 == -0)
				x1 = 0;
			cout << fixed;
			cout << setprecision(5) << "x1=" << x1 << "+" << unfi << "i;x2="
			<< x1 << "-" << unfi << "i" <<endl;
		}
	}
	return 0;
}


int main()
{
     int n;
  float a,b,c,d,j,k;
  double x1,x2;
  char i;
  cin>>n;
  d=1;
  i='i';
  for(d=1;d<=n;d=d+1)
  {
   cin>>a>>b>>c;
   if(b*b-4*a*c>0)
   {
    x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
             x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
             cout<<fixed<<setprecision(5)<<"x1="<<x1<<fixed<<setprecision(5)<<";x2="<<x2<<endl;
   }
      if(b*b-4*a*c==0)
      {
       if(b==0)
       {
        x1=(b + sqrt(b*b-4*a*c))/(2*a);
        cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
       }
       else
       {
        x1=(-b + sqrt(b*b-4*a*c))/(2*a);
        cout<<fixed<<setprecision(5)<<"x1=x2="<<x1<<endl;
       }
      }
      if(b*b-4*a*c<0)
      {
       if(b==0)
       {

       j=0;
       k=sqrt(4*a*c-b*b)/(2*a);
          cout<<fixed<<setprecision(5)<<"x1="<<j<<"+"<<fixed<<setprecision(5)<<k<<i<<";x2="<<fixed<<setprecision(5)<<j<<"-"<<fixed<<setprecision(5)<<k<<i<<endl;
          }
       else
       {
        j=-b/(2*a);
        k=sqrt(4*a*c-b*b)/(2*a);
           cout<<fixed<<setprecision(5)<<"x1="<<j<<"+"<<fixed<<setprecision(5)<<k<<i<<";x2="<<fixed<<setprecision(5)<<j<<"-"<<fixed<<setprecision(5)<<k<<i<<endl;
       }
  }
  }
 return 0;
  }


void coutnoneg (double a)
{
	if(a==0) cout<<0.0;
	else cout<<a;
}
int main()
{
	int n;
	double a,b,c,d,x1,x2;
	cout<<fixed<<setprecision(5);
	for(cin>>n;n--;)
	{
      cin>>a>>b>>c;
	  d=b*b-4*a*c;
	  if(d>0)
	   {
	     x1 = ( -b + sqrt(b*b-4*a*c))/(2*a);
		 x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
		 cout<<"x1=";
		 coutnoneg(x1);
		 cout<<";x2=";
		 coutnoneg(x2);
	   }
	  if(d==0)
	   {
		  x1 = (-1*b)/(2*a);
          cout<<"x1=x2=";
		  coutnoneg(x1);
	   }
	  else if(d<0)
	   {
        x1 = (-b)/(2*a);
		x2 = sqrt(-d)/(2*a);
		cout<<"x1=";
		coutnoneg(x1);
		cout<<'+';
		coutnoneg(x2);
		cout<<"i";
		cout<<";x2=";
		coutnoneg(x1);
		cout<<'-';
		coutnoneg(x2);
		cout<<"i";
	   }
cout<<endl;
	}
return 0;
}


int main()
{
 int n,m;
 double a,b,c,x,y,p,q,disc;
 scanf("%d",&n);
 for(m=1;m<=n;m++)
 {
  scanf("%lf %lf %lf",&a,&b,&c);
  disc=b*b-4*a*c;
  p=-b;
  p=p/2;
  p=p/a;
  if (disc>0)
  {
   q=sqrt(disc);
   q=q/2.0;
   q=q/a;
   x=p+q;y=p-q;
   printf("x1=%.5f;x2=%.5f",x,y);
   printf("\n");
  }
  else if (disc==0)
  {
   printf("x1=x2=%.5f",p);
   printf("\n");
  }
  else
  {
   disc=-disc;
   q=sqrt(disc);
   q=q/2.0;
   q=q/a;
   if(p==-0) p=0;
   printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi",p,q,p,q);
   printf("\n");
  }
 }
 return 0;
}


int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int m;
	double a,b,c,x1,x2,dt,xubu,shibu;
	for (m=1;m<n+1;m++)
	{
		scanf("%lf""%lf""%lf",&a,&b,&c);
		dt=b*b-4*a*c;
		if (dt>0)
		{
			x1=(-b+sqrt(dt))/(a*2);
                            x2=(-b-sqrt(dt))/(a*2);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if (dt==0)
		{
			x1=(-b)/(a*2);
			printf("x1=x2=%.5lf\n",x1);
		}
		else if (dt<0)
		{
			xubu=(sqrt(-dt))/(2*a);
			shibu=(-b)/(a*2);
                            if(shibu==0)
                            {
              printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-shibu,xubu,-shibu,xubu);
		}
else if(shibu==-0)
{printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",-shibu,xubu,-shibu,xubu);}
else
{
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",shibu,xubu,shibu,xubu);}

	}
}

	return 0;
}


void main()
{
int n,i=1;
double a[100],b[100],c[100],x1,x2,realpart,imagpart,disc;
scanf("%d",&n);

while (i<=n)
{
	scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
    i+=1;
}
i=1;
while (i<=n)
{
    disc=b[i]*b[i]-4*a[i]*c[i];
	if (disc>0)
	{
		x1=(-b[i] + sqrt(disc))/(2*a[i]) , x2=(-b[i] - sqrt(disc))/(2*a[i]);
		if ( fabs(x1)<1e-5) x1=0;
    	if ( fabs(x2)<1e-5) x2=0;
		printf ("x1=%.5f;x2=%.5f\n",x1,x2);
	}
    else
	{
		if (disc==0)
		{
				x1=(-b[i])/(2*a[i]);
				if(fabs(x1)<1e-5)   x1=0;
                printf ("x1=x2=%.5f\n",x1);
		}
		else
		{
			realpart=(-b[i])/(2*a[i]);
		    imagpart=sqrt(-disc)/(2*a[i]);
			if ( fabs(realpart)<1e-5) realpart=0;
			if ( fabs(imagpart)<1e-5) imagpart=0;

			printf ("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", realpart,imagpart, realpart,imagpart);
		}
	}
     i+=1;
}
}


int main()
{
double a,b,c;
double x1,x2,delta;
double root;
int n,i;

scanf("%d",&n);
for(i=1;i<=n;i++)
{
   scanf("%lf %lf %lf",&a,&b,&c);
   delta=b*b-4*a*c;
   if(delta<0)
   {
		delta=-delta;
		root=(-b)/(2*a);
		if(root==0) root=-root;
		printf("x1=%.5f",root);
		printf("+");
		printf("%.5f",sqrt(delta)/(2*a));
		printf("i");
		printf(";");
		printf("x2=%.5f",root);
		printf("-");
		printf("%.5f",sqrt(delta)/(2*a));
		printf("i");
		printf("\n");
   }
   else
   {
      x1=(-b+sqrt(delta))/(2*a);
	  x2=(-b-sqrt(delta))/(2*a);
	  if(x1==x2)
	  {
	    printf("x1=x2=%.5f",x1);
		printf("\n");
	  }
	  else
	  {
	    printf("x1=%.5f",x1);
		printf(";");
		printf("x2=%.5f",x2);
		printf("\n");
	  }

   }

}

return 0;
}


double dt(double a,double b,double c)
{
	return(b*b-4*a*c);
}
double ba(double a,double b)
{
	return(-b/(2*a));
}
double gdt(double a,double dtt)
{
	return(sqrt(dtt)/(2*a));
}
double yu(double a,double b,double c)
{
	return(sqrt(fabs(-dt(a,b,c)/(4*a))));
}
void main()
{
	int n;
	double a,b,c;
	scanf("%d",&n);
	int i;
	double d;
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&a,&b,&c);
		if(ba(a,b)<1e-25&&ba(a,b)>-1e-25)
			d=0.0;
		else
			d=ba(a,b);
		if(dt(a,b,c)==0)
			printf("x1=x2=%.5lf\n",d);
		else if(dt(a,b,c)>0)
			printf("x1=%.5lf;x2=%.5lf\n",d+gdt(a,dt(a,b,c)),d-gdt(a,dt(a,b,c)));
		else if(dt(a,b,c)<0)
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",d,yu(a,b,c)/sqrt(a),d,yu(a,b,c)/sqrt(a));
	}
}


int main()
{
	char a[10000];
	gets(a);
	int length[301]={0};
	int i,geshu=0,state=OUT;

	geshu=0;

	for(i=0;a[i]!='\0';i++){
		if(a[i]==' '){
			state=OUT;
		}
		else{
			if(state==OUT){
				geshu++;
				length[geshu]++;
				state=IN;
			}
			else if(state==IN){
				length[geshu]++;
			}
		}
	}

	for(i=1;i<geshu;i++){
		printf("%d,",length[i]);
	}
	printf("%d",length[geshu]);

	return 0;
}


int main()
{
 	char zfc[30000];
 	int sz[301];
 	int i,num=0,l,x=0;
 	gets(zfc);
 	l=strlen(zfc);
 	for(i=0;i<l;i++){
		if(i==0&&zfc[i]==' ') continue;
		else{
			if(zfc[i]!=' '){
				num++;
				}
			else{
				if(zfc[i-1]!=' '){
					sz[x]=num;
					x++;
					num=0;
					}
				}
	    	}
		}
	if(zfc[l-1]!=' '){
		sz[x]=num;
		x++;
		}
	for(i=0;i<x;i++){
		if(i<x-1) printf("%d,",sz[i]);
		else printf("%d",sz[i]);
		}

    return 0;
}


main()
{
      char a[1000];
      gets(a);
      int i=0,time=0,temp=0;
      int len=strlen(a);
      for(i=0;i<len;i++)
      {
                        if(a[i]!=' ')
                        {
                                temp++;
                        }
                        else
                        {
                            if(temp!=0)
                            {
                                       if(time==0) printf("%d",temp);
                                       else printf(",%d",temp);
                                       time++;
                                       temp=0;
                            }
                        }
      }
      if(time==0) printf("%d",temp);
      else printf(",%d",temp);
}


int main()
{
	char ch;
	int len = 0,tag=0;
	while((ch = getchar()))
	{
		if((ch == ' '||ch=='\n') && len)
		{
			if(tag)
				printf(",");
			printf("%d", len);
			len = 0;
			tag=1;
			if(ch=='\n')
				break;
		}
		else if(ch!= ' ')
			len++;
	}
	printf("\n");
	return 0;
}


char a[300];

int main()
{

	gets(a);
	int n=strlen(a);

	int p=0,q=0,m=0;
	while(p<n&&q<n)
	{
		while(a[p]==' ')
			p++;

		q=p;

		while(a[q]!=' '&&a[q]!=0)
			q++;
		if(m==0)

		    printf("%d",q-p);
		else
			printf(",%d",q-p);
		p=q;
		m++;
	}

	return 0;

}


void main()
{
	int i,j;
	int flag=0;
	int flagdh=0;
	char a[1000];
	int counts=0;
	gets(a);
	for(i=0;a[i]!='\0';i++)
	{
		if(a[i+1]!='\0')
		{
			if(flag==0&&a[i]!=' ')
			{
				flag=1;
				counts++;
			}
			else if(flag==1&&a[i]!=' ')
			{
				counts++;
			}
			else if(flag==1&&a[i]==' ')
			{
				flag=0;
				if(flagdh==0)
				{
					flagdh=1;
					printf("%d",counts);
				}
				else
				{
					printf(",%d",counts);
				}
				counts=0;
			}
		}
		else
		{
			if(flag==1)
			{
				if(a[i]!=' ')
				{
					counts++;
					if(flagdh==0)
					{
						printf("%d",counts);
					}
					else
					{
						printf(",%d",counts);
					}
				}
				else
				{
					if(flagdh==0)
					{
						printf("%d",counts);
					}
					else
					{
						printf(",%d",counts);
					}
				}
			}
			else
			{
				if(a[i]!=' ')
				{
					if(flagdh==0)
					{
						printf("1");
					}
					else
					{
						printf(",1");
					}
				}
			}
		}
	}
}


void main()
{
	char str[100000]={'\0'};
	int n,i,len,temp=-1;
	gets(str);
	n=strlen(str);
	for(i=n-1;i>=0;i--)
	{
		str[i+1]=str[i];
	}
	str[0]=' ';
	for(i=0;i<=n;i++)
	{
		if(str[i]==' ')
		{
			len=i-temp-1;
			temp=i;
			if(len!=0)
				printf("%d,",len);
		}
	}
	printf("%d",(n-temp));
}


int main(){
    int i,j=0,k=0;
    char sentence[2100],word[301][17];
    gets(sentence);
    for(i=0;i<strlen(sentence);i++){
        if(sentence[i]!=' '){
            word[k][j]=sentence[i];
            j++;
        }else if(sentence[i]==' '&&sentence[i-1]!=' '){
            k++;
            j=0;
        }
    }

    for(i=0;i<=k;i++){
        if(i==0)
            printf("%d",strlen(word[i]));
        else
            printf(",%d",strlen(word[i]));
        }
    return 0;
}


int main(){
	char zifuchuan[N];
	int i,a=0;
	gets(zifuchuan);
	int n=strlen(zifuchuan);
	for(i=0;i<n;i++){
		if(zifuchuan[i]!=' '){
			a++;
		}else{
			if(a==0)continue;
			printf("%d,",a);
			a=0;
		}
	}	printf("%d",a);
	return 0;
}


int main()
{
	char zifu[5000];
	gets(zifu);
	int len;
	len=strlen(zifu);
	int i;
	int t=0;
	int j=0;
	for (i=0;i<=len;i++)
	{
		if (zifu[i]!=' ')
		{
			t++;
			if (zifu[i+1]=='\0')
			{
				j++;
				if (j==1)
				{
					printf("%d",t);
				}
				else
				{
					printf(",%d",t);
				}

				return 0;
			}

		}
		else if(zifu[i]==' '&&zifu[i+1]!=' ')
		{
			j++;
			if (j==1)
			{
				printf("%d",t);
			}
			else
			{
				printf(",%d",t);
			}
			t=0;
		}
	}

	return 0;

}


void main()
{
char a[20];
int i=1,n;
char c;
do
{
scanf("%s",a);
n=strlen(a);
if(i==1)
printf("%d",n);
else
printf(",%d",n);
i++;
}
while((c=getchar())!='\n');
}


char str[100000];
int main(int argc, char* argv[])
{

	int a[300];
	int i,len;
	gets(str);
	len=strlen(str);

	int word=0,num=0,total=0;
	for(i=0;i<len;){
		while(str[i]!=' '&&i<len){
	num++;
	i++;
	word=1;
		}
		if(word==1){
		total++;
		a[total-1]=num;
		}
		num=0;
		i++;
		word=0;

	}
	for(i=0;i<total-1;i++){
	printf("%d,",a[i]);
	}
	printf("%d\n",a[total-1]);
	return 0;
}


void main()
{
	int i,len=0,tag=1,flag=1;
	char c[6000];
	gets(c);
	for(i=0;i<6000;i++)
	{
		if(c[i]!=' '&&c[i]!='\0')
		{
			tag=1;
			len++;
		}
		else if(c[i]==' ')
		{
			if(tag==1&&flag==1)
			{
				printf("%d",len);
				flag=0;
			}
			else if(tag==1&&flag==0) printf(",%d",len);
			else continue;
			tag=0;
			len=0;
		}
		else if(c[i]=='\0')
		{
			if(flag==0) printf(",%d",len);
			else if(flag==1) printf("%d",len);
			break;
		}
	}
}


int main()
{
    int i,n,count=0;
    char a[301][500];
    int b[301];
    for(i=0;i<300;i++)
    {
                      scanf("%s",a[i]);
                      n=strlen(a[i]);
                      b[i]=n;
                      count++;
                      if(n==0)
                      break;
    }
    for(i=0;i<count-1;i++)
    {
                        if(i==0)
                        printf("%d",b[i]);
                        else
                        printf(",%d",b[i]);
    }
    return 0;
}


void main()
{
    char chuan[10000];
    int i,j=0;
    char *p=chuan;
    gets(chuan);
    for (i=0;chuan[i]!='\0';i++)
    {
        if(chuan[i]!=' ')
        {
            j=j+1;
        }
        if(chuan[i]==' '&&chuan[i-1]!=' ')
        {
            printf("%d,",j);
            j=0;
        }
    }
    printf("%d",j);
}


int main()
{
    char s[110][20];
    int i=1;
    scanf("%s",s[0]);
    printf("%d",strlen(s[0]));
    while(scanf("%s",s[i])!=EOF)
    {
      printf(",%d",strlen(s[i]));
      i++;
    }
    printf("\n");
}


int main()
{
    char s[1000];
    char words[300][20];
    gets(s);
    int i,j,n,k;
    int sum;
    n = 0; k = 0;
    for (i = 0; s[i] != 0; i++)
    {
        if (s[i] == ' ')
        {
            s[i] = '\0';
            strcpy(words[n], (s + k));
            n++;
            k = i + 1;
        }
    }
    strcpy(words[n], (s + k));
    n++;

    sum=strlen(words[0]);
    if(sum!=0)
    {
    printf("%d",sum);}
    for(i=1;i<n;i++)
    {
      int result=0;
      result=strlen(words[i]);
      if(result==0)
      {
        continue;}
      if(result!=0)
      {
      printf(",%d",result);}
    }
    return 0;
}


void main()
{
  char string[10000],c;
	int i,num,word,a[300];
  num=0;
  word=0;
		 gets(string);
      for (i=0;(c=string[i])!='\0';i++)
	  {
		  if(c==' ') word=0;
	      else {
		        if(word==0)
				{
			      word=1;
			      num=num+1;
			      a[num-1]=0;
				}
		        a[num-1]=a[num-1]+1;

		  }
	  }
	for (i=0;i<=num-1;i++)
	{printf("%d",a[i]);
	if (i<num-1) printf(",");}
}


char a[50000];

int main()
{
    gets(a);
    int i,j;
    int n=strlen(a);
    int flag=0;
    int isfirst=1;
     a[n]=' ';
    for(j=0;j<n;j++)
    {
        if(a[j]!=' ')
        {
         flag++;
         }

     if(a[j+1]==' '&&a[j]!=' '&&isfirst!=1)
     {printf(",%d",flag);
      flag=0;}
     if(a[j+1]==' '&&a[j]!=' '&&isfirst==1)
     {printf("%d",flag);
      isfirst=0;
      flag=0;}

     }
return 0;
}


int main(){
    int isfirst=1;
    char word[1000];
    while(scanf("%s",&word)!=EOF)
    {
        if(isfirst==1)
        {
            isfirst=0;
        }
        else
        {
            printf(",");
        }
        printf("%d",strlen(word));
    }
    printf("\n");
    return 0;
}


void main()
{
	int i,num=0,n;
	char s[10000];
	gets(s);
	n=strlen(s);
	for(i=0;i<=n;i++)
	{
		if(s[i]!=' '&&s[i]!='\0')
			num++;
		else if(s[i]==' ')
		{
			if(num==0)
				continue;
			else {printf("%d,",num);
			num=0;}
		}
		else if(s[i]=='\0')
			printf("%d\n",num);
	}
}


void main()
{
	char str[3000];
	gets(str);
	int i,len,j=0;
	len=strlen(str);
      for(i=0;i<len;i++)
	  {
         	if(str[i]!=' ') j++;
			else { if(j!=0) {printf("%d",j); if(i<len-1) printf(",");j=0;}}

	  }
	  j=0;
	   for(i=0;i<len;i++)
	  {
         	if(str[i]!=' ') j++;
			else j=0;
	  }
	   printf("%d\n",j);
}


void main()
{
	char str[10000];
	int i,n,word=0;
	gets(str);
	n=strlen(str);
	str[n]=' ';
	for(i=0;i<n+1;i++)
	{
		if(str[i]!=' ') word=word+1;
        else if(str[i]==' ' && i!=n && str[i-1]!=' ') {printf("%d,",word);
		                                               word=0;
		                                               }
		else if(i==n) printf("%d",word);
	}
}


int main(){
	char xulie[10000];
	int l=0;
	int i,len;
	int x,y;
	x=0;
	y=0;
	gets(xulie);
	len=strlen(xulie);
	xulie[len]=' ';
	for(i=0;i<=len;i++){
		if(xulie[i]!=' '){
			l++;
		}else if(xulie[i]==' '&&xulie[i-1]!=' '){
			printf("%d",l);
			l=0;
			break;
		}
	}
	i++;
	while(i<=len){
		if(xulie[i]!=' '){
			l++;
		}else if(xulie[i]==' '&&xulie[i-1]!=' '){
			printf(",%d",l);
			l=0;
		}
		i++;
	}
	return 0;
}


int main()
{
	char zfc[2000];
	gets(zfc);
	int sl=strlen(zfc);
	int n=0;
	for(int i=0;i<=sl;i++)
	{

		if(i==0)
		{
			n++;
			continue;
		}
		if(zfc[i]!=' '&&zfc[i]!='\0')
		{
			n++;
			continue;
		}
		if(zfc[i]==' '&&zfc[i-1]!=' ')
		{
			printf("%d,",n);
			n=0;
			continue;
		}
		if(zfc[i]==' '&&zfc[i+1]==' ')
		{
			continue;
		}
		if(zfc[i]=='\0')
		{
			printf("%d",n);
		}
	}
	return 0;
}


void main()
{
    char str[8000];
	gets(str);
	int l=strlen(str),i,num=0,len[800]={0},word;
	for(i=0;i<l;i++)
	{
		if(str[i]==' ') word=0;
		else word=1;
		if(word==1) len[num]=len[num]+1;
		else if(word==0&&i>0&&str[i-1]!=' ') num=num+1;
	}
	printf("%d",len[0]);
	int j=1;
	while(len[j]!=0)
	{
		printf(",%d",len[j]);
		j=j+1;
	}
}


int len;
int checkbegin(char a[],int i)
{
	int j;
	for(j=i;j<len;++j)
		if(a[j]!=' ')
			return(j);
}
int checkend(char a[],int i)
{
	int j;
	for(j=i+1;j<=len;++j)
		if(a[j]==' '||a[j]=='\0')
			return(j);
}
main()
{
	char a[1000];
	int i=0,b;
	gets(a);
	len=strlen(a);
	b=checkend(a,checkbegin(a,i))-checkbegin(a,i);
	printf("%d",b);
	i=checkend(a,checkbegin(a,i))+1;
	while(i<=len)
	{
		b=checkend(a,checkbegin(a,i))-checkbegin(a,i);
		printf(",%d",b);
		i=checkend(a,checkbegin(a,i))+1;
	}
}


int main()
{
 char str[6000],words[M][N];
  int len,i=0,j=0,k=0,p;
 gets(str);
 len=strlen(str);
 while(i<len)
 {
  if(str[i]!=' ')
  {
   for(j=i;str[j]!=' '&&j<len;j++)
   {
    words[k][j-i]=str[j];
   }
   words[k][j-i]='\0';
   k++;
   i=j+1;
  }
  else
   i++;
 }
   p=k;
    printf("%d",len=strlen(words[0]));
 for(k=1;k<p;k++)
  printf(",%d",len=strlen(words[k]));
 return 0;
}


int main()
{
  char origin[30000];
  gets(origin);

  int i, total=0, first=1;

  for (i=0; origin[i]; i++) {
    if (origin[i]!=' ') {
      ++total;
    } else {
      if (origin[i-1]!=' ') {
        if (first==1) {
          printf("%d", total);
          first=0;
        } else {
          printf(",%d", total);
        }
      }
      total=0;
    }
  }

  if (first==1) {
    printf("%d",total);
  } else {
    printf(",%d",total);
  }
  return 0;
}


int main()
{
    int i,j,n,p;
	char ch[max];

	gets(ch);
	p=1;

	n=strlen(ch);
	for(i=0;i<n;i++)
	{
	    while((ch[i]==' ')&&(i<=n))
			i++;
		j=i;
		while((ch[j]!=' ')&&(j<=n))
			j++;
		if(j>=n) j--;
		if(p)
		{
		    printf("%d",j-i);
			p=0;
		}
		else
			printf(",%d",j-i);
		i=j;
	}

	return 0;
}


int main(int argc, char* argv[])
{
	char string[30000];
	int i,len,count=0;
	gets(string);
	len=strlen(string);
	for(i=0;i<len;i++)
	{
		if(string[i]!=' ')
			count++;
		if(string[i]==' '&&string[i+1]!=' ')
		{
			printf("%d,",count);
			count=0;
		}
	}
	printf("%d",count);
	return 0;
}


void main()
{
	char sent[999];
	int l,i,k=0;
	gets(sent);
	l=strlen(sent);
	for(i=0;i<l;i++)
	{
		if(sent[i]!=' ')
			k++;
		if(sent[i]==' '&&i!=0&&k!=0)
		{
			printf("%d,",k);
			k=0;
		}
	}
	printf("%d\n",k);
}


// µ¥´ÊµÄ³¤¶ÈµÚ¶þµ¯.cpp : Defines the entry point for the console application.
//

int main(int argc, char* argv[])
{
	char ju[10000];
	int i,a,num,pan=0;
	gets(ju);
	a=strlen(ju);
	i=0;
	num=0;
	while(i<a-1){
		if(ju[i]==' '){
			printf("%d",num);
			pan=1;
			i++;
			num=0;
			break;
		}else{
			num++;
			i++;
		}
	}
	while(i<a-1){
		if(ju[i-1]!=' '&&ju[i]==' '){
			printf(",%d",num);
			i++;
			num=0;
		}else if(ju[i]!=' '){
			num++;
			i++;
		}else i++;
	}
	if(pan==1)printf(",%d\n",num+1);
	else printf("%d\n",num+1);
	return 0;
}


int main(){
	char zfc[1500];
	int n;
	int kongge[600];
	int i;
	int j=1;
	int k;
	gets (zfc);
	n=strlen(zfc);
	kongge[0]=-1;
	for(i=0;i<n;i++){
		if(zfc[i]==' '){
			kongge[j]=i;
			j++;
		}
	}
	k=j;
	j=0;
	kongge[k]=n;
	if(j==0){
		printf("%d",kongge[j+1]-kongge[j]-1);
		j++;
	}
	for(j=1;j<k;j++){
		if((kongge[j+1]-kongge[j]-1)!=0){
			printf(",%d",kongge[j+1]-kongge[j]-1);
		}
	}
	return 0;
}


int main() {
	char inputChar, tmp;
	tmp = ' ';
	int num = 0;
	while (true) {
		inputChar = getchar();
		if(inputChar != '\n') {
			if(inputChar != ' ') num++;
			else {
				while(tmp == ' ') {
					tmp = getchar();
					if (tmp != ' ') {
						printf("%d,", num);
						tmp = ' ';
						num = 1;
						break;
					}
				}
			}
		}
		else {
			printf("%d", num);
			break;
		}
	}
	return 0;
}


main()
{
	int l[500]={0},i,max,k,zero=1;
	char temp;
	max=1;
	temp=getchar();
	while(temp!='\n')
	{
		if(temp!=' ')
		{
			l[max]++;
			zero=1;
		}
		else
		{
			if(zero==1)max++;
			zero=0;
		}
		temp=getchar();
//		printf("%c",temp);
//		printf("%d\n",max);
	}
	for(i=1;i<=max;i++)
	{
		if(i!=1)printf(",");
		printf("%d",l[i]);
	}
}


int main()
{
 char s[1000],sub[100],*ptr;
 int i,j,mark=0;
 gets(s);
 ptr=s;
 for( ; *ptr != 0; )
 {
 	if(*ptr == ' ') {		ptr++;		continue;    }
    /* get a word from s */
  for(i=0; i<100; i++)          sub[i]=0;

  for ( i=0 ; ; ptr++, i++)
  {
       sub[i] = *ptr;
       if (((sub[i] == ' ') || (sub[i]==0)) && (mark==0) )
       {
          sub[i] = 0;
          printf("%d",strlen(sub));
          mark=1;
          break;
       }
       if(((sub[i] == ' ') || (sub[i]==0)) && (mark!=0))
       {
          sub[i] = 0;
          printf(",%d",strlen(sub));
          break;
       }
  }
	if(*ptr == 0)  break;
	else				   ptr++;
 }
 return;
}


int main(){
    char sen[300*20];
    int i,k=0,wordlen=0,a[300];
    gets(sen);
    for(i=0;i<strlen(sen);i++){
        if(sen[i]==' '){
            if(wordlen!=0){a[k]=wordlen;
            k++;}
            wordlen=0;
        }else{wordlen++;}
    }a[k]=wordlen;
    for(i=0;i<k;i++){
        printf("%d,",a[i]);
    }printf("%d",a[k]);
        return 0;
    }


void main()
{
	char c[1000];
	int i,n=0,flag=0;
	gets(c);
	for(i=0;c[i]!='\0';i=i+1)
	{
		if(c[i]!=' ')
			n=n+1;
		else
		{
			if(n!=0)
			{
				if(flag==0)
				{
					printf("%d",n);
					flag=1;
				}
				else
					printf(",%d",n);
				n=0;
			}
			else
				continue;
		}
	}
	if(n!=0)
	{
		if(flag!=0)
			printf(",%d\n",n);
		else
			printf("%d\n",n);
	}
}


int main()
{
	int a;
	char dc[50];
	scanf("%s",dc);
	a=strlen(dc);
	printf("%d",a);
	while(scanf("%s",dc)==1){
		a=strlen(dc);
		printf(",%d",a);
	}
	return 0;
}


void main()
{
	int i,j;
	char s[300][100];
	for(i=0;;i++)
	{
		scanf("%s",s[i]);
		if(getchar()=='\n') break;
	}
	for(j=0;j<i;j++)
	{
		printf("%d,",strlen(s[j]));
	}
	printf("%d",strlen(s[i]));
}


int main()
{
	char sent[5000];
	gets(sent);

	char word[601][15];

	int lsent=strlen(sent);
	int i=0,t=0,k,l;
	while(i<=lsent){
		if(sent[i]=='\0'){
				break;
		}
		for(k=0;k+i<=lsent;k++){

		     if(sent[i+k]!=' '&&sent[i+k]!='\0'){
			       word[t][k]=sent[i+k];
			 }else{
			       word[t][k]='\0';
				   i+=strlen(word[t]);
			       t++;

		       	   break;
			 }
		}
		i++;

	}
	int e;
	for(l=0;l<t;l++){
		e=strlen(word[l]);
		if(l==0){
			if(e!=0){
			printf("%d",e);
			}
		}else{
			if(e!=0){
			printf(",%d",e);
			}
		}
	}
	return 0;
}


int main()
{
    char a[100];
    int n,i,r=0;
    scanf("%s",&a);
    i=strlen(a);
    printf("%d",i);
    while(scanf("%s",&a)!=EOF)
    {
        i=strlen(a);
        printf(",%d",i);
    }
    printf("\n");
}


int main(){
	char s[300][100];
	int i = 0;
	scanf("%s",s[i]);
	printf("%d",strlen(s[i]));
	while(1){
		i++;
		scanf("%s",s[i]);
		if(strcmp(s[i],s[i-1])==0 || strlen(s[i]) == 0 )
			break;
		else{
			printf(",");
			printf("%d",strlen(s[i]));
		}
	}
}


int main()
{
    char s[1000];
    gets(s);
    int i, count[200], len, j=0;
    int first=1;
    len=strlen(s);
    memset(count, 0, sizeof(count));
    for(i=0; i<len; i++)
    {
        if(s[i]!=' ')
        {

           do
            {
                count[j]++;
                i++;
            }while((i!=len)&&(s[i]!=' '));

			j++;

        }
    }
    for(i=0; i<j; i++)
    {
        if(first)
        first=0;
        else printf(",");
        printf("%d", count[i]);
    }
	printf("\n");
    return 0;
}


int main()
{
    char s[10000];
    char *pr[300];
    int i, n = 0,len;

    gets(s);

    len=strlen(s);
    pr[n++] = s;
    for (i=0; i<len; i++) {
        if (s[i] == ' ') {
            s[i] = 0;
            pr[n++] = s+i+1;
        }
    }

	for(i=0;i<n-1;i++)
	{
		len=strlen(pr[i]);
		if(len!=0)
		{
			printf("%d,",len);
		}
	}
	len=strlen(pr[n-1]);
	if(len!=0)
	{
		printf("%d",len);
	}
	return 0;
}


int main()
{char a[300][20];
int n,i;
scanf("%s",a[0]);
n=strlen(a[0]);
printf("%d",n);
for(i=1;i<300;i++){
scanf("%s",a[i]);
n=strlen(a[i]);
if(n==0)break;
else
printf(",%d",n);}

	return 0;
}


int wordsnumber(char a[])
{
	int i=0,num;
	for (;a[i]!='\0';i++)
	{
		num=i;
	}
	num=num+1;
	return (num);
}

void main()
{
	char A[1000]={'\0'},B[300][100]={'\0'};
	int numA,i,t,j,count;
	int num[300];
	gets(A);
	numA=wordsnumber(A);
	for (i=0,t=0,j=0;i<numA;i++)
	{
		if (A[i]!=' ')
		{B[t][j]=A[i];j=j+1;}
		else
		{t=t+1;j=0;}
	}
	for (i=0,count=0;i<t+1;i++)
	{
		if (B[i][0]=='\0') continue;
		count=count+1;
		num[i]=wordsnumber(B[i]);

		if (count==1) printf("%d",num[i]);
		else printf(",%d",num[i]);
	}
	printf("\n");
}


int main(){
	char sz[3000];
        gets(sz);
	int jishu,i;
	jishu=0;
	int num=strlen(sz);
	for(i=0;;i++){
	    if(sz[i]!=32&&sz[i]!='\0')
			jishu++;
		else if(sz[i]==32&&jishu!=0){
			printf("%d,",jishu);
			jishu=0;}
		if(sz[i]=='\0'&&jishu!=0){
			printf("%d",jishu);
			break;
	}}
	return 0;
}


int main()
{
	char s[6000],a[50];
	gets(s);
	int ls=strlen(s);
	int la;
	int i,j=0;
	int first=1;
	for(i=0;i<ls+1;i++){
		if(s[i]!=' '&&s[i]!='\0'){
			a[j]=s[i];
			j++;
		}
		else{
			a[j]='\0';
			j=0;
			la=strlen(a);
		    if(first==1&&la!=0){
			printf("%d",la);
			first=0;
			}else if(la!=0){
			printf(",%d",la);
			}
		}
	}

	return 0;
}


int main()
{
	char string[9000];
	char str[300][30];
	char temp[30]="";
	int k=0,j=0,i,n,m,l=0;
	gets(string);

	n=strlen(string);
	for (i=0;i<n;i++)
	{
		if ( string[i]!=' ')
		{
			temp[k]=string[i];
			str[j][k]=string[i];
			k++;
			l=1;
		}
		else
		{
			if(l==1)
			{
				strcpy(str[j],temp);
				k=0;
				j++;
			}
			for(m=0;m<30;m++)temp[m]=0;
			l=0;
		}
		if(i==n-1)
		{
		strcpy(str[j],temp);
		for(m=0;m<30;m++)temp[m]=0;
		}
	}
	for(i=0;i<j;i++)
	{
		printf("%d,",strlen(str[i]));
	}
	printf("%d",strlen(str[j]));
	return 0;
}


int main()
{
	char test='1',*p;
	//int word[300]={0};
	int i=0;
	//char *q=p;
	while(1){
		while(test !='\n' && test==' ')
			test=getchar();
		int count=0;
		while(test !='\n' && test!=' ' && test!=0){
			test=getchar();
			count++;
		}
		if(i==0)
			count--;

		printf("%d",count);
		if(test!='\n')
			printf(",");
		else break;
		i++;
	}
	return 0;
}


int main(){
    char str[30000];
    gets(str);
    int i,len,k=0,m=0;
    len=strlen(str);
    int kong[500];
    for(i=0;i<len;i++){
         if(str[i]==' '){
               kong[k]=i;
               k++;
         }
    }
    int chang[500];
    for(i=0;i<k-1;i++){
          chang[m]=kong[i+1]-kong[i]-1;
          m++;
    }
    if(k!=0){
    printf("%d,",kong[0]);
    for(i=0;i<m;i++){
        if(chang[i]!=0){
           printf("%d,",chang[i]);
        }
    }
    printf("%d",len-kong[k-1]-1);
    }else{printf("%d",len);}
return 0;
}


int main()
{
	char (*p)[20];
	int i=0,ok=1;
	p=(char(*)[20])calloc(300,20*sizeof(char));
	while(scanf("%s",*(p+i))==1)
	{
		if (ok)
		{printf("%d",strlen(*(p+i)));ok=0;}
		else
			printf(",%d",strlen(*(p+i)));
		i++;
	}

  return 0;
}


int main(int argc, char* argv[])
{
	char str[30000];
	int i,n,k,flag=0,num=0,a[300];
	gets(str);
	n=0;
	i=0;
	while(str[i]!='\0')
	{
		n++;
		i++;
	}
	for(i=0;i<n;i++)
	{
	    if(str[i]==' ')
			flag=0;
		else if(flag==0)
		{
			flag=1;
			num++;
		}
	}
	for(i=0;i<num;i++)
	{
		static int j=0;
		k=0;
		for(;j<n;j++)
		{
			if(str[j]==' ')
				continue;
			else
			{
			    k++;
				if(str[j+1]==' ')
				{
					j=j+1;
					break;
				}
			}
		}
		a[i]=k;
	}
	for(i=0;i<num;i++)
	{
		if(i==num-1)
			printf("%d",a[i]);
		else
			printf("%d,",a[i]);
	}

	return 0;
}


int main(){
char str[30000];
cin.getline(str,30000);
int num=1;
int i=0,j=0;
while(str[i]!='\0')
{
	if(str[i]==' '&&str[i-1]!=' ')
	{
		if(j==0)
		{
			cout<<num;
			j++;
		}
		else
			cout<<','<<num;
		num=0;
	}
	i++;
	if(str[i]!=' ') num++;
}
if(j==0) cout<<num-1<<endl;
else cout<<','<<num-1<<endl;
return 0;
}


int main ()
{
	char words[300][30];
	char temp;
   int i=0,l;
   scanf("%s",words[i]);
   l=strlen(words[i]);
   printf("%d",l);
   i++;
   scanf("%c",&temp);
   while (temp!='\n')
   {
	   scanf("%s",words[i]);
	   l=strlen(words[i]);
	   printf(",%d",l);
	   i++;
            scanf("%c",&temp);

   }
   return 0;
}


int main(){
	char str[3000],b[10];
	char *s=str,*p;
	int l;
	gets(s);
	strcat(s," ");
	while(*s){
		p=strchr(s,' ');
		*p='\0';
		strcpy(b,s);
		l=strlen(b);
		if(l!=0){
			printf("%d",l);
		}
		s=p+1;
		if(*s&&l!=0){
			printf(",");
		}
	}
	return 0;
}


//
//  main.cpp
//  ds
//
//  Created by Love on 12-12-27.
//  Copyright (c) 2012? Love. All rights reserved.
//

int main(){
    char s[10000];
    int i,num=0,final;
    gets(s);
    for (i=0; s[i]; i++) {
        if (s[i]!=' ') {
            num++;

        }else{
            if (num==0) {
            }else{
            printf("%d,",num);
            num=0;
            }

        }
    }
    printf("%d",num);
    return 0;
}


int main(){
	char zfc[10000];
	gets(zfc);
	int count=0;
	int len;
	len=strlen(zfc);
	for(int i=0;i<=len;i++){
		if(zfc[i]!=' '){
			count++;
		}
		if(zfc[i]==' '&&zfc[i-1]!=' '){
			printf("%d,",count);
			count=0;
		}
		if(zfc[i]=='\0'&&zfc[i-1]!=' '){
			printf("%d",count-1);
		}
	}return 0;
}


void main()
{
	char a[30];
	scanf("%s",&a);
	printf("%d",strlen(a));
	while(scanf("%s",a)!=EOF)
		printf(",%d",strlen(a));
}


int main()
{
    int out=0;
    char input[123456];
    while(scanf("%s", input)>0){
        if(out++) putchar(',');
        printf("%d", strlen(input));
    }
    return 0;
}


int main()
{
	char z[2050];
	gets(z);
	int i=0;
	int n=strlen(z);
	int record=0;
	int q=0;
	z[n]=' ';
	for(i=0;i<=n;i++)
	{
		if(z[i]==' ' && z[i-1] != ' ')
		{
			if(q==0)
			{
				printf("%d",record);
				q=1;
			}
			else
			{
				printf(",%d",record);
			}
			record=0;
		}
		else if(z[i] != ' ')
		{
			record++;
		}
	}
	return 0;
}


int main()
{
  char zfc[30000];
  int i,len,length[301]={0},t=0,k;
  gets(zfc);
  len=strlen(zfc);
  for(i=0;i<len;i++)
  {
      if(zfc[i]==' ')
      {
          for(k=i+1;;k++)
          {
              if(zfc[k]==' ')
              {
                  continue;
              }
              else
              {
                  t++;
                  i=k;
                  break;
              }
          }
      }
      length[t]++;
  }
  for(i=0;i<=t;i++)
  {
      if(i==0)
      {
           printf("%d",length[0]);
      }
      else
      {
          printf(",%d",length[i]);
      }
  }
  return 0;
}


void main()
{
	int n[300],count=0,i=0,j;
	char t;
	while(t=getchar(),t!='\n')
	{
		if(t==' ')
		{
			if(count!=0)
			{
				i++;
				n[i]=count;
				count=0;
			}
			goto next;
		}
		else count++;
next:;
	}
	n[i+1]=count;
	printf("%d",n[1]);
	for(j=2;j<=i+1;j++)
		printf(",%d",n[j]);
}


void main()
{
	char word[300][50],c=' ';
	int num[300]={0},i,t;
	for(i=1;c==' ';i++)
	{
		scanf("%s",word[i]);
		c=getchar();
		num[i]=strlen(word[i]);
		t=i;
	}
	for(i=1;i<t;i++)
		printf("%d,",num[i]);
		printf("%d",num[t]);

	}


char s[3001];
int len;

int main()
{
    int i,miao=1,n=0;
    gets(s);
    len=strlen(s);
    for(i=0;i<=len;i++)
    {
        if(s[i]==' '||s[i]=='\0')
        {
            if(n!=0)
            {
                if(miao!=1)
                    printf(",");
                    printf("%d",n);
                    miao++;
            }
            n=0;
        }
        else
        n++;
    }
    printf("\n");
    return 0;
}


int main(){
int num=0,x=0;
int  dcs[360];
char dc[6000];
gets(dc);
for (int i=0;i<strlen(dc);i++){
      if (dc[i]==' '){
           dcs[x]=num;
           x++;
           num=0;
      }
      else {
          num++;
      }
      if(i==strlen(dc)-1){
            dcs[x]=num;
            x++;
      }
}
for (int j=0;j<x;j++){
      if (dcs[j]!=0){
          if (j!=x-1){
                 printf("%d,",dcs[j]);
          }
          else {
                 printf("%d",dcs[j]);
                 break;
          }
      }
}
return 0;
}


void main()
{
	char str[10000];
	char *p;
	gets(str);
	p=str;
	int k;
	k=0;
	while(*p!='\0')
	{
		if(*p!=' ')
		{k++;p++;}
		else if(*(p-1)!=' ')
		{
			printf("%d,",k);
			p++;
			k=0;
			continue;
		}
		else {p++;continue;}
	}
	printf("%d",k);
}


int main()
{
	int len,i,cout,j;
    char b[10000];
	gets(b);
    len=strlen(b);
	for(i=0;i<len;i++)
	{
		cout=0;
		while((b[i]!=' ')&&(i<len))
		{
			cout++;
		    i++;
		}
		printf("%d",cout);
			break;
	}
	for(j=i+1;j<len;j++)
	{
		cout=0;
		if(b[j]==' ')
		{
			continue;
		}
		while((b[j]!=' ')&&(j<len))
		{
			cout++;
		    j++;
		}
		printf(",%d",cout);
	}
	return 0;
}


void main()
{
	char ch[1000000];
	void f(char *p,int n);
		int m;
	gets(ch);
    m=strlen(ch);
	f(ch,m);

}
void f(char *p,int n)
{
	int i,j,k=0;
	j=0;
    for(i=0;i<n;i++)
	{

		if(*(p+i)!=' ')
			j++;

		else
		{
			if(j!=0)
			printf("%d,",j);
			j=0;
		}

	}
	for(i=n-1;i>-1;i--)
		if(*(p+i)!=' ')
			k++;
		else
			break;
		if(k!=0)
		printf("%d",k);

}


int main(int argc, char* argv[])
{
	char e[50];
	int a;
	scanf("%s",e);
	printf("%d",strlen(e));
	while(scanf("%s",e) == 1){
		printf(",%d",strlen(e));
	}
	return 0;
}


void main()
{
	char s;

	int i=0,m;
	while((s=getchar())!='\n')
	{
		if(s!=' ')
		{
		i++;
		}
		else if(i>0)
		{
		printf("%d,",i);
		i=0;
		}
	}
	printf("%d",i);

}


int main()
{
    int i,j,k,mark,flag,len;
    int Len[300];
    char sen[999];

    i=0;
    j=0;
    k=0;
    flag=1;
    mark=0;
    gets(sen);

    for(i=0;i<999;i++)
    {
     if(sen[i]==' '&&flag==1)
      {
      flag=0;
      Len[j]=i-mark;
      mark=i+1;
      j++;
      }

     else if(sen[i]==' '&&flag==0)
       mark++;

     else if(sen[i]!=' '&&sen[i]!='\0')
      flag=1;

     else if(sen[i]=='\0')
      {
      Len[j]=i-mark;
      break;
      }
     }

     for(k=0;k<j;k++)
      printf("%d,",Len[k]);
     printf("%d",Len[j]);
}


int main()
{
char a[300][50]={'0'};
char b;
int max=0,min=0,i;
for(i=0;;i++)
{
scanf("%s",a[i]);
scanf("%c",&b);
if(b==10)
break;
}
printf("%d", strlen(a[0]));
for(i=1;i<300;i++)
{
if(strlen(a[i])!=0)
printf(",%d", strlen(a[i]));
else break;
}
return 0;
}


void main()
{
	char *temp,s[1000];
	int p=0;
	gets(s);
	temp=s;
	for(temp=s;*temp!='\0';temp++)
	{
		if(*temp==' ') {if(p>0) printf("%d,",p);p=0;}
		else p++;
	}
	printf("%d",p);
}


int main()
{
	int len;
	char word[30];
	cin >> word;
	len = strlen(word);
	cout << len;
	while(cin >> word)
	{
		len = strlen(word);
		cout << "," << len;
	}
	cout << endl;
	return 0;
}


void main()
{
char str[10000],*p;
int num=0;
gets(str);
for(p=str;*p!='\0';p++)
   {if(*p!=' ')
    num=num+1;
    else if(*p=' ' && num!=0)
	 {printf("%d,",num);
	  num=0;
	 }
	}
    printf("%d",num);
}


void main()
{
	int a[300]={0},len=0,i=0,flag=1,j;
	char c;
	while((c=getchar())!='\n')
	{
		if(c!=' ')
			if(flag)
			{flag=0;len++;}
			else len++;
		else if(flag==0){flag=1;a[i]=len;len=0;i++;}
	}
	a[i]=len;
	for(j=0;j<i;j++)
		printf("%d,",a[j]);
	printf("%d\n",a[j]);
}


int main()
{
	char a[100];
	int n=0,t=0;
	scanf("%s",a);
	printf("%d",strlen(a));
	while(scanf("%s",a)!=EOF)
	{
		printf(",%d",strlen(a));
	}
	return 0;
}


main()
{
  int i,n,sum=0;
  char a[10000];
  gets(a);
  n=strlen(a);
  for(i=0;i<n;i++)
  {
    if(a[i]!=' ')
    {
      sum=sum+1;
      continue;
    }
    else if(a[i]==' '&&a[i-1]!=' ')
    {
      printf("%d,",sum);
      sum=0;
    }
    else continue;
  }
  printf("%d",sum);
}


int main()
{
	char string[5000];
	int i,num=0,n;
	char c;
	gets(string);
	n=strlen(string);
	for(i=0;i<=n-1;i++)
	{
		if((c=string[i])!=' ')
		num=num+1;
		else
		{
		    if(num!=0)
			{printf("%d,",num);
			num=0;}
		}

	}
    printf("%d",num);
}


int main()
{
 char zfc[1000],zsz[1000][1000];
 gets(zfc);
 int word_i = 0, word_j = 0;
 int i,n;
 n=strlen(zfc);
 for(i=0;i<n;i++){
  if (zfc[i] == ' ') {

   zsz[word_i][word_j] = '\0';
   word_j=0;
   word_i++;
  } else {
   zsz[word_i][word_j] = zfc[i];
   word_j++;
   if (i == n-1) {
    zsz[word_i][word_j] = '\0';
    word_i++;
   }
  }
 }

 int l[1000],j;
 for(j=0;j<word_i;j++){
  l[j]=strlen(zsz[j]);
  if(l[j]!=0){
   if(j!=0){
    printf(",%d",l[j]);
   }
      else {
       printf("%d",l[j]);
   }
  }
 }
    return 0;
}


int main()
{
	int i=0,num=0,l=0,temp=0;
	char words[LEN];
	gets(words);
	l=strlen(words);
	for(i=0;i<l;i++)
	{
	  if(words[i]!=' ')
	  {
	    num++;
		if(i==l-1)
		{
		  printf("%d",num);
		}
	  }
	  if(words[i]==' ')
	  {
		if(num!=0)
		{
	      printf("%d",num);
		  printf(",");
		}
		num=0;
	  }
	}
	return 0;
}


int main()
{
	char zf[300*100];
	gets(zf);
	int i,j=0,k=0;
	int length[300];
	int len=strlen(zf);
	for(i=0;i<len;i++)
	{
		k++;
		if(zf[i]==' ')
		{
			length[j]=k-1;
			j++;
			k=0;
		}
		if(i==len-1)
		{
			length[j]=k;
			j++;
			break;
		}
	}
	printf("%d",length[0]);
	for(i=1;i<j;i++)
	{
		if(length[i]==0) continue;
		printf(",%d",length[i]);
	}
	return 0;
}


void main()
{
	char ch[60000];
    int i=0;
	gets(ch);
	int length=0;
	for(i=0;i<strlen(ch);i++)
	{
		if(ch[i]==' ')
		length=0;
		else
		length=length+1;
		if(ch[i]!=' '&&ch[i+1]==' ')
		printf("%d,",length);
		if(ch[i]!=' '&&ch[i]!='\0'&&ch[i+1]=='\0')
		printf("%d",length);
	}

}


int main()
{
 char str[3000];
 int i=0,flag=0,letter=0;
 gets(str);
 while(1)
      {
       if(str[i]==' '||str[i]=='\0')
         {
          if(letter)
            {
                if(flag)
                   printf(",");
                else
                     flag=1;
                printf("%d",letter);
                letter=0;
           }
         }
       else
           letter++;
       if(!str[i])
         break;
       i++;
       }
 return 1;
}


void main()
{
  char string[300][20];
  int i,j=0,k,l[300],n=0;
  while((scanf("%s ",string[n]))!=EOF)
	  n++;
  for(i=0;i<n;i++)
	  l[i]=strlen(string[i]);
  for(k=0;k<n-1;k++)
     printf("%d,",l[k]);
  printf("%d",l[n-1]);
}


void main()
{
	int num[300],n,word,k,i;
	char str[10000];
	int *pnum;
	char *pstr;
	gets(str);
	k=strlen(str);
	pstr=str;
	pnum=num;
	for(i=0;i<300;i++)
	{
		*pnum=0;
		pnum++;
	}
	pnum=num;
	word=1;
	n=0;
	for(pstr=str;pstr<str+k;pstr++)
	{
		if(*pstr==' ')
		{
			if(word==0)
			{
				word=1;
				n++;
				pnum++;
			}
		}
		else
		{
			word=0;
			(*pnum)++;
		}
	}
	for(pnum=num;pnum<num+n;pnum++)
		printf("%d,",*pnum);
	printf("%d",*pnum);
}


int main()
{
	char ch;
	int i = 0, j, k;
	int conuter = 0;
	int length[300] = {0};
	while (1)
	{
		scanf("%c", &ch);
		if (ch == '\n')
		{
			length[i] = conuter;
			break;
		}
		else
		{
			if (ch == ' ')
			{
				length[i] = conuter;
				conuter = 0;
				if (length[i] != 0)
				{
					i++;
				}
			}
			else
			{
				conuter++;
			}
		}
	}
	for (j = 0; j < i; j++)
	{
		printf("%d,", length[j]);
	}
	printf("%d", length[j]);
	return 0;
}


void main()
{
	char c='\n';char a[100]; int i;
	for(i=0;;i++)
	{
		if(i==0)
		{scanf("%s",a);
		printf("%d",strlen(a));}
		else
	{scanf("%s",a);
		printf(",%d",strlen(a));}
		if(c==getchar()) break;
	}
}


void main()
{
	char a[100],b;
	int i,j;
	scanf("%s",a);
		printf("%d",strlen(a));
	while(1)
	{
		if((b=getchar())=='\n')break;
		else
		{
		scanf("%s",a);
		printf(",%d",strlen(a));
		}
	}

}


int main()
{
	int len=0,m=0,i=0;
	char sentence[6000];
	gets(sentence);
	len=strlen(sentence);
	for(i=0;i<=len;i++)
	{
		if(sentence[i]!=' '&&sentence[i]!=0)
			m++;
		else
		{
			printf("%d",m);
			m=0;
			break;
		}
	}
	for(i=i+1;i<=len;i++)
	{
		if(sentence[i-1]==' '&&sentence[i]!=' ')
			m=1;
		else if(sentence[i-1]!=' '&&(sentence[i]!=' '&&sentence[i]!=0))
			m++;
		else if(sentence[i-1]!=' '&&(sentence[i]==' '||sentence[i]=='\0'))
			printf(",%d",m);
	}
	return 0;
}


char str[1000];
int main(){
	char c;
	int i=0;
	while((c=getchar())!='\n'){
		str[i]=c;
		i++;
	}
	str[i]='\0';
	int len=i;
	int count=0;
	int num=0;
	for(i=0;i<=len;i++){
		if (str[i]==' '||str[i]=='\0'){
			if (count==0) continue;
			if (num==0){
			cout<<count;
			num++;
			}
			else
			{cout<<","<<count;
			}
			count=0;
			continue;
		}
		count++;
	}
	cout<<endl;

	return 0;
}


int main()
{
	char a;
	int flag=0,len=0;
	do{
		a=getchar();
		if((a==' '||a=='\n')&&len!=0)
		{
			if(flag++)
			{	printf(",%d",len);
			len=0;
			}
			else
			{	printf("%d",len);
			    len=0;
			}
		}
		else if(a!=' '&&a!='\n') len++;
	}while(a!='\n');
	return 0;
}


void main()
{
char string[10000];
int i,num=0,word=0,a[300];
char c;
gets(string);
for (i=0;(c=string[i])!='\0';i++)
   if (c==' ') word=0;
   else {
	        if (word==0)
				 {
	           word=1;
	           num=num+1;
           	   a[num-1]=0;
				 }
           a[num-1]++;
   }
for (i=0;i<num-1;i++)
printf("%d,",a[i]);
printf("%d",a[num-1]);
}


int main()
{
    char a[10000];
    int i,s=0;
    gets(a);
    for (i=0;i<strlen(a);i++)
    {
        if (a[i]!=' ')
        s=s+1;
        else if (a[i]!=a[i-1])
        {
            printf("%d",s);
            if (i+1<strlen(a)) printf(",");
            s=0;
        }
    }
    printf("%d",s);

    return 0;
}


int main()
{
char str[999],temp[300];
int len,k=0,j,i=0,a,b,c;
gets(str);
len=strlen(str);
for(j=0;j<=len;j++)
{
   if(str[j]==' ')
   {
     while(i<j)
     {
     temp[k]=str[i];
     i++;
     k++;
     }
     temp[k]='\0';
     i++;
     a=strlen(temp);
     if(a!=0)
     printf("%d,",a);
     k=0;
   }
   if(str[j]=='\0')
   {
     while(i<j)
     {
     temp[k]=str[i];
     i++;
     k++;
     }
     temp[k]='\0';
     a=strlen(temp);
     printf("%d",a);
   }
}
return 0;
}


main()
{

    int i=0;
    char a[100];
	while(scanf("%s",a)!=EOF)
	{if(i==0){printf("%d",strlen(a));i++;}
	 else printf(",%d",strlen(a));
	}
}


int main()
{
	char str[999999];
	gets(str);
	int len=strlen(str);
	int i,n=0,k=0;
    char words[300][100];
	for(i=0;i<len;i++)
	{
		if(str[i]!=' ')
		{
			words[n][k]=str[i];
			k++;
		}
		else if(str[i-1]!=' '&&str[i]==' ')
		{
			words[n][k]='\0';
		    n++;
			k=0;
		}
	}
	words[n][k]='\0';
	for(i=0;i<n;i++)
	{
		printf("%d,",strlen(words[i]));
	}
	printf("%d",strlen(words[n]));
	return 0;
}


int main()
{
    char zfc[NUM*LEN],z1[100],z2[100];
    char c[NUM][LEN];
    int i,j,k,n,p,count,count1,count2,count4,count3[50];
    int num1,num2,d=0;
    gets(zfc);
	count=0;
	for(k=0;;)
		{
            if(zfc[count]!=' '&&zfc[count]!=0)
			{
                c[0][k]=zfc[count];
                count++;
                k++;
            }
			else
			{
                c[0][k]=0;
                count++;
                k++;
                break;
            }
        }
		if(k-1!=0)printf("%d",k-1);
	for(i=1;;i++)
	{
        for(k=0;;)
		{
            if(zfc[count]!=' '&&zfc[count]!=0)
			{
                c[i][k]=zfc[count];
                count++;
                k++;
            }
			else
			{
                c[i][k]=0;
                count++;
                k++;
                break;
            }
        }
		if(k-1!=0)printf(",%d",k-1);
        if(zfc[count-1]==0){
            break;
        }
    }
   return 0;
}


int main()
{
	char a[9000];
	int len,num=0,i,j,k,word=0;
	gets(a);
	len=strlen(a);
	for(i=0;i<len;i++)
	{
		if(a[i]==' ')
		{
			if(num!=0)
			{
			printf("%d",num);word++;
			num=0;
			break;
			}
		}
		else
		{
			num++;
		}
	}
	for(i=i+1;i<len;i++)
	{
		if(a[i]==' ')
		{
			if(num!=0)
			{
			printf(",%d",num);word++;
			num=0;
			}
		}
		else
		{
			num++;
		}
	}
	if(num!=0)
	{
		if(word==0)
			printf("%d",num);

			else
		printf(",%d",num);
	}

}


void main()
{
	char str[10000];
	int i,j=0,len[300],add=0,flag;
	for(i=0;i<300;i++)
		len[i]=0;
	gets(str);
	if(str[0]!=32)
	{
		flag=1;
		add++;
		for(i=1;i<strlen(str);i++)
		{
			if(str[i]!=32&&i<strlen(str)-1)
			{
				add++;
				flag=1;
			}
			else if(str[i]!=32&&i==strlen(str)-1)
			{
				add++;
				len[j]=add;
				flag=0;
				add=0;
			}

			else if((str[i]==32)&&flag)
			{
				len[j]=add;
				flag=0;
				add=0;
				j++;
			}

		}
	}
	else
	{
		flag=0;
		for(i=1;i<strlen(str);i++)
		{
			if((str[i]!=' ')&&flag)
				add++;
			else if((str[i]!=' ')&&(flag==0))
			{
				flag=1;
				add++;
			}
			else if((str[i]==' ')&&flag)
			{
				len[j]=add;
				flag=0;
				add=0;
				j++;
			}
			else {}
		}
	}

	printf("%d",len[0]);
	for(i=1;len[i];i++)
		printf(",%d",len[i]);

}


int main()
{
   char str[300][10],c;
   int num[300],n,i;
   scanf("%s",str[0]);
   num[0]=strlen(str[0]);
   for(i=1;c=getchar()!='\n';i++)
   {
      scanf("%s",str[i]);
      num[i]=strlen(str[i]);
    }
    n=i;
    printf("%d",num[0]);
    for(i=1;i<n;i++)
    {
      printf(",%d",num[i]);
     }
}


void main()
 {
	char a[20],b;
	scanf("%s",a);
	printf("%d",strlen(a));
	b=getchar();
	if (b==' ')
	{
	for (;;)
	{
		scanf("%s",a);
		printf(",%d",strlen(a));
		b=getchar();
		if (b!=' ') break;
	}
	}
 }


int main()
{
	char str[300][100];
	int i, l, n;
	for (i = 0;;i++)
	{
		scanf("%s",str[i]);
		if (str[i][0] == '\0')
			break;
		l = strlen(str[i]);
		if (i == 0)
		{
			printf("%d",l);
		}
		else printf(",%d",l);
	}

	return 0;
}


int main()
{
    char s[100];
    char i=0;
    scanf("%s",&s);
    i=strlen(s);
    printf("%d",i);
    while(scanf("%s",&s)!=EOF)
    {
        i=strlen(s);
        printf(",%d",i);
    }
    getchar();
    getchar();
}


void main()
{
	char str[20000];
	int i,count=0,flag=0;
	for(i=0;i<20000;i++)
		str[i]='\0';
	gets(str);
    for(i=0;i<20000;i++)
	{
		if(str[i]!=' '&&str[i]!='\0') count++;
		else
		{
			if(count!=0)
			{
				flag++;
				if(flag==1) printf("%d",count);
	    	    else printf(",%d",count);
			}
           count=0;
		}
	}
}


int main()
{
	char zfc[50];
	int a,b,c;
	int i,j,k;
	j=0;
		while(scanf("%s", zfc)!=EOF)
		{
		if(j!=0)
		{printf(",");}
		printf("%d",strlen(zfc));
		j++;
		}

	return 0;
}


int main()
{
    int n,s=0,i,m;
    char a[A];
    gets(a);
	n=strlen(a);
	for(i=0;i<n;i++)
	{
		m=0;
		if(a[i]==' ') continue;
		else
		{
			if(s!=0) printf(",");
			for(;i<n;i++)
			{

				if(a[i]==' ') 	{printf("%d",m);s=1;break;}
				if(i==n-1) {printf("%d",m+1);s=1;break;}
				m++;
			}
		}
	}
	return 0;
}


int ss=0;
void check(char *ps)
{
	static int k,m;             //k:lengh of word   ;  m:former-0->' '//
	if(*ps==' '||*ps=='\0')
	{
		if(m==1)
		{
			m=0;
			if(ss==0)
			{
				ss=1;
				printf("%d",k);
			}
			else
				printf(",%d",k);
		m=0;
		k=0;
		}
		if(*ps=='\0')
			return;
	}
	else
	{
		m=1;
		k++;
	}
	check(ps+1);
}

main()
{
	char *p;
	p=(char*)malloc(10000*sizeof(char));
	gets(p);
	check(p);
}


char s[100000];
int main()
{
	int l,i,start,end;
	gets(s);
	l=strlen(s);
	start=0;
	end=0;
	while(1)
	{
		for(i=start;i<l;i++)
		{
			if(s[i]==' ')
			{
				end=i;break;
			}
			if(i==(l-1))
			{
				end=l;break;
			}
		}
		if(start==0) printf("%d",end);
		else printf(",%d",end-start);
		if(end==l) break;
		for(i=end;;i++)
		{
			if(s[i]!=' ')
			{
				start=i;break;
			}
		}
		end=start;
	}
	return 0;
}


void main()
{
	char c;
	int len;
	char a[100];
	int flag=0;
	while(1)
	{
		scanf("%s",a);
		len=strlen(a);
		if(flag==0)
		{
			flag=1;
			printf("%d",len);
		}
		else if(flag==1)
		{
			printf(",%d",len);
		}
		c=getchar();
		if(c=='\n')
			break;
	}
}


int read(char x[])
{
	int i,len,num=0;
	len=strlen(x);
	for(i=len-1;i>=0;i--)
	{
		if(x[i]!=' ')
			num++;
		else
			break;
	}
	x[i]='\0';
	return(num);
}
void move(char x[])
{
	int len,i;
	len=strlen(x);
	for(i=len;i>=1;i--)
		x[i]=x[i-1];
	x[len+1]='\0';
	x[0]=' ';
}
int count(char x[])
{
	int len,i,p=0,m=0;
	len=strlen(x);
	for(i=0;i<len-1;i++)
	{
		if(x[i]==' ')
			p=0;
		else if(p==0)
			{
				p=1;
				m++;
			}
	}
	return(m);
}
void cut(char x[])
{
	int len;
	len=strlen(x);
	while(x[len-1]==' ')
	{
		x[len-1]='\0';
		len--;
	}
}

main()
{
	char w[3000];
	int word[300],i,j,n;
	gets(w);
	move(w);
	n=count(w);
	for(i=n-1;i>=0;i--)
	{
		word[i]=read(w);
		cut(w);
	}
	for(j=0;j<n;j++)
	{
		printf("%d",word[j]);
		if(j<n-1)
			printf(",");
	}
}


void main()
{
	char str[300][40],c;
	int i;
	for(i=0;;i++)
	{
		scanf("%s",&str[i]);
	    c=getchar();
		if(c!=' ') break;
		printf("%d,",strlen(str[i]));
	}
	printf("%d",strlen(str[i]));
}


void main()

{
	int i=1,m=0,len[300];
	char c,str[20];
	scanf("%s",str);
	len[0]=strlen(str);
	while((c=getchar())!='\n')
	{
		scanf("%s",str);
		len[i]=strlen(str);
		i++;
	}
	m=i;
	if (m==1) printf("%d",len[0]);
	else
	{
		printf("%d,%d,",len[0],len[1]);
		for(i=2;i<m-1;i++)
		printf("%d,",len[i]);
		printf("%d",len[m-1]);
	}
}


int main(){
	int n,i=0,t=0;
	char c;
	for(;;){
		scanf("%c",&c);
		if(c=='\n'){
			if(i!=0)printf(",");
			printf("%d",t);
			break;
		}
		else if(c==' '){
			if(t==0)continue;
			else{
			if(i!=0)printf(",");
			printf("%d",t);
			t=0;
			i=1;
			}
		}
		else t++;
	}
	return 0;
}


void main()
{
	char a;
	int length[500]={0};
	int i,j=0,sign=0;
 	for(i=0;;i++)
	{
		scanf("%c",&a);
		if(a!=' '&&a!='\n') length[j]++;
		else if(a==' ') j++;
		else break;
	}
	for(i=0;i<=499;i++)
	{
		if(length[i]!=0)
		{
			if(sign==0)
			{
				printf("%d",length[i]);
				sign=1;
			}
			else printf(",%d",length[i]);
		}
	}
}


int main()
{

	int len,k=0,i,n;
	char sen[3001];
	gets(sen);
	len=strlen(sen);

	for(i=0;i<len;i++)
	{

		if(sen[i]==' '&&k!=0)
		{	printf("%d,",k);
			k=0;

		}
		else if(i==len-1)
		{
			printf("%d",k+1);
			k=0;
		}
		else {if(sen[i]!=' ')k++;}
	}

	return 0;
}


int main(){
    int len;
    char sp,word[300][20];
    for(int i=0;i<300;i++){
         scanf("%s%c",word[i],&sp);
         len=strlen(word[i]);
         if(len==0){
             break;
                      }
          if(i==0){
            printf("%d",len);
           }else{printf(",%d",len);}
         }
            return 0;
    }


char a[1000000];
int main()
{

	int  num,i,len;
	gets(a);
	len=strlen(a);
	for(i=0;i<len;i++)
	{
		num=0;
		if(a[i]==' '){continue;}
		while(a[i]!=' '&&(i!=len-1))
		{
			num++;
			i++;
		}
		if(i!=len-1){printf("%d,",num);}
		else{printf("%d",num+1);}
	}
	printf("\n");
	return 0;
}


int main()
{
	char input[500][200],letter;
	int row,i,j;
	for (i=0;i<500;i++)
	{
		for (j=0;j<200;j++)
		{
			input[i][j]='\0';
		}
	}
	i=0;
	j=0;
   while(1)
	{

		letter=getchar();
		if (letter!=' '&&letter!='\n')
		{
			input[i][j]=letter;
			j++;
		}
		else if(letter==' ')
		{
			i++;
			j=0;
		}
		if(letter=='\n')
		{
			row=i;
			break;
		}
   }

   int LEN[500];
   for(i=0;i<row;i++)
   {
	   LEN[i]=strlen(input[i]);
	   if(LEN[i]!=0)
	   printf("%d,",LEN[i]);
   }
   LEN[row]=strlen(input[row]);
   printf("%d",LEN[row]);

	return 0;
}


void main()
{
	char a[200][40];
	int len[200],i=0,n;
    leap:scanf("%s",a[i]);
	len[i]=strlen(a[i]);
	i++;
	if(getchar()==' ') goto leap;
	n=i;
	for(i=0;i<n-1;i++) printf("%d,",len[i]);
	printf("%d",len[n-1]);
}


int main()
{
	char ch;
	int len = 0;
	while((ch = getchar()) != '\n')
	{
		if(ch == ' ' && len)
		{
			printf("%d", len);
			len = 0;
			break;
		}
		else if(ch != ' ')
			len++;
	}
	if(ch == '\n')
	{
		printf("%d\n", len);
		return 0;
	}
	while((ch = getchar()) != '\n')
	{
		if(ch == ' ' && len)
		{
			printf(",%d", len);
			len = 0;
		}
		else if(ch != ' ')
			len++;
	}
	if(len) printf(",%d\n", len);
	else printf("\n");
	return 0;
}


int main()
{
int i=0;
char word[300][100];
scanf("%s",word[i]);
printf("%d",strlen(word[i]));
for(i=1;;i++)
{
    if(scanf("%s",word[i])==EOF)break;
    printf(",%d",strlen(word[i]));
}
}


void main()
{
	char str[300][100];
	int i=0;
	scanf("%s",str[i]);
	int n=strlen(str[i]);
	printf("%d",n);
	while(scanf("%s",str[i])!=EOF)
	{
		n=strlen(str[i]);
		printf(",%d",n);
		i=i+1;
	}
}


int sums[310];

void main()
{
	int n=0;
	int i;
	int sum = 0;
	char a;
	while(a = getchar())
	{
		if(a == '\0' || a == '\n' )
		{
			sums[n] = sum;
			n++;
			break;
		}
		else if( a == ' ' )
		{
			if(sum != 0)
			{
				sums[n] = sum;
				n++;
			}
			sum = 0;
		}
		else
		{
			sum++;
		}
	}
	for(i=0;i<n-1;i++)
	{
		printf("%d,",sums[i]);
	}
	printf("%d",sums[n-1]);
}


void main()
{
	char *str,*p,*q;
	int n;
	str=(char*)malloc(301*sizeof(char));
	memset(str,'\0',sizeof(str));
	gets(str);
	p=q=str;
	while(1)
	{
		if(*p!=' '&&*p!='\0')
		{
			p++;
			continue;
		}
		if(*p==' '||*p=='\0')
		{
			n=p-q;
			if(n==0)
			{
				p++;
				q=p;
				continue;
			}
			if(*p=='\0')
			{
				printf("%d",n);
				break;
			}
			if(*p==' ')
			{
				printf("%d,",n);
				p++;
				q=p;
				continue;
			}
		}
	}
}


int main()
{

char s[N];
gets(s);
int n,i,j=0,m=0,q=0;
n=strlen(s);
for(i=0;i<n;i++)
{
    if(s[i]!=' ')
    {

        j ++;
    }
    else
    {
        if(s[i+1]==' ')
        continue;
        q++;
        if(q==1)
        printf("%d",j);
        else if(q>1)
           printf(",%d",j);
        j=0;
    }
if(i==n-1)
 {
     if(q==0)
      printf("%d",j);
      else
      printf(",%d",j);
 }

}
return 0;
}


void main()
{
	char str[300][50];
	int i=0,n,m;
	while(scanf("%s",str[i])!=EOF)
	{i++;}
	n=i;
	for(i=0;i<n;i++)
	{
		m=strlen(str[i]);
		if(i<n-1)
			printf("%d,",m);
		if(i==n-1)
			printf("%d",m);
	}
}