semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
struct data
{
	char c;
	struct data *pt;
};//????????

struct data *create(void)//??????
{
	struct data *head,*p1,*p2;

	p1=p2=(struct data *)malloc(sizeof(struct data));//????
	head=p1;
	p1->c=getchar();

	for(;p2->c!='\n';)//?????
	{p1=(struct data *)malloc(sizeof(struct data));
	p1->c=getchar();
	p2->pt=p1;//???p2???????
	p2=p1;
	p2->pt=NULL;}

	return head;

}
void main()
{

	struct data *headi,*ptr;
	int flag=0;
	headi=create();
	
	for(ptr=headi;ptr!=NULL;ptr=ptr->pt)//????
		if('9'>=ptr->c&&'0'<=ptr->c) putchar(ptr->c),flag++;
		else 
		{
			if(ptr->pt!=NULL)
				if('9'>=ptr->pt->c&&'0'<=ptr->pt->c&&flag!=0)
					putchar('\n');
		}
}
int main()
{
	char str[40];;
	char *p=str;
	cin.getline (str,40);
   for  (;*p!='\0';p++)
   {
	   if (*p-'0'<=9&&*p-'0'>=0)
	   {cout<<*p;//???1-9?????????
	     if (*(p+1)-'0'>9||*(p+1)-'0'<0)
			 cout<<endl;//????????????????
	   }
   }
   return 0;
}
int main()
{
   char a[31];
   cin.getline(a,31,'\n');
   int b=strlen(a);
   char c[31];
   char *p=a;
   char *q=c;
   for(;p<a+b;q++,p++)
    {
       if(*p-'0'>=0&&*p-'0'<=9)
         *q=*p;
       else
         *q='\n';
     }
   for(q=c;q<c+b;q++)
     cout<<*q;
      
     
     
   
   
   
   
 
 return 0;
 }
void TiquShuzi(char*str)//?????????????????
{   int k=0;//???????????0
	if(*str>47&&*str<58)//?????????????
			cout<<*str;//?????????
    for(char*p=str+1;*p!='\0';p++){//???????
        if(*p>47&&*p<58){//??????
			cout<<*p;//??????
			k=0;//??????
		}
		else{//????????
			if(k==0)//?????????????
				cout<<endl;//??
			k+=1;//??????
		}
	}
}
int main(){//???
    char str[50];//?????
    cin.getline(str,sizeof(str));//?????
    TiquShuzi(str);//????
    return 0;
}
/*
 * ????.cpp
 *
 *  Created on: 2011-12-25
 *      Author: Administrator
 */
int main()//?????
{//?????
    char str[31];
    cin.getline(str,31);//??
    int length=strlen(str);//????
    int i,j,t;
    for(i=0;i<= length;i++)
    {
		if((str[i]<'0')||(str[i]>'9'))continue;//???i????????????
		else
			for(j=1;j<=length-i;j++)
			{
    			if((str[i+j]<'0')||(str[i+j]>'9') || (str[i+j]=='\0'))
    			{
    				for(t=i;t<i+j;t++)
    					cout<<str[t];
    				cout<<endl;//??
    				i = i + j - 1;
    				break;
    			}
    		}
    }
    return 0;//???????????????????
}//????
int main()
{
			char s[1000],f[200];
			cin.getline(s,200);
			char *p;int i,t;
			p=s;i=0;
			while (*p!='\000')
					{
						while (((*p<48)||(*p>57))&&(*p!='\000')) p++;
						while ((*p>=48)&&(*p<=57)&&(*p!='\000')) {cout<<*p;p++;}
      cout<<endl;
					}
}
void main()
{char c[31],*p;
int i,j,k;
gets(c);

p=c;
for(;*p!='\0';p++)
{if(((int)*p>47&&(int)*p<58)&&((int)*(p+1)>47&&(int)*(p+1)<58))
printf("%c",*p);
else
if(((int)*p>47&&(int)*p<58)&&((int)*(p+1)<48||(int)*(p+1)>57))
printf("%c\n",*p);}
}
void main()
{
	int i;
	char str[40];
	gets(str);
	for(i=0;str[i];i++)
	{
		if(str[i]>47&&str[i]<58)
		{	printf("%c",str[i]);
			if(str[i+1]&&!(str[i+1]>47&&str[i+1]<58))printf("\n");
		}
	}
}
int main()
{
	char str[31];
	char *pointer=NULL;
	cin.getline(str,31);
	pointer=str;
	while(*pointer!=0)
	{
		if(*pointer>='0'&&*pointer<='9')
		{
			if(pointer==str||*(pointer-1)!='-')
			{
				while(*pointer>='0'&&*pointer<='9')
				{
					cout<<*pointer;
					pointer++;
				}
				cout<<endl;
			}
			else
			{
				while(*pointer>='0'&&*pointer<='9') pointer++;
			}
		}
		else pointer++;
	}
	return 0;
}
int main(){
char a[31];
cin.getline(a,31);
int d,i;
d=strlen(a);
int b[100];
memset(b,-1,sizeof(b));
int num=0;
int sum=0;
for(i=0;i<d;i++){
	if((a[i]<58)&&(a[i]>47)){
		sum=sum*10+(int)(a[i]-48);
		b[num]=sum;
	}
	else {
		num++;
		sum=0;
	}
}
for(i=0;i<100;i++){
	if(b[i]>=0){
	cout<<b[i]<<endl;}
	else continue;
}
return 0;}
int main()
{char a[31];
 char *p;
 cin.getline(a,31);
 p=a;
 while(*p!='\0')
 {if(*p>='0'&&*p<='9')
  {
   while(*p>='0'&&*p<='9')
   {cout<<*p;
    p++;
   }
   cout<<endl;
  }
  else p++;
 }
 return 0;
}
int main()
{
	char c[30];
	int i,n,shi,zhong,m,l;
	gets(c);
	n=strlen(c);
	for(i=0;i<n;i++)
	{
		if(c[i]<='9'&&c[i]>='0')
		{
			shi=i;
			for(l=i;l<n;l++)
			{
				if(c[l]>'9'||c[l]<'0')
				{
					zhong=l-1;
					break;
				}
				if(l==n-1)
					zhong=n-1;
			}
			for(m=shi;m<zhong;m++)
			{
				printf("%c",c[m]);
			}
			printf("%c\n",c[zhong]);
			i=zhong;
		}
	}
	return 0;
}
/*
 * file    homework 11_3
 * author  ??
 * date    2010-12-09
 * description
           ???????????
*/



int main()
{
	char str[31];
	char *p;
	cin.getline(str, 31);
	p = str;
	while (*p != '\0')
	{
		while ((*p > '9' || *p < '0') && *p != '\0')
			p++;
		if (*p == '\0')
			break;
		while (*p <= '9' && *p >= '0')
		{
			cout << *p;
			p++;
		}
		cout << endl;
	}
	return 0;
}
int main()
{
	int i,j,len,sp;															//????????????
	char str[31];															//???????????
	memset(str,'\0',sizeof str);
	cin.getline(str,31);													//?????
	len=strlen(str);
	for(i=0;i<len;i++)
	{
		if((str[i]>='0'&&str[i]<='9')&&(str[i+1]<'0'||str[i+1]>'9'))		//??????????????
			cout<<str[i]<<endl;
		else if((str[i]>='0'&&str[i]<='9')&&(str[i+1]>='0'||str[i+1]<='9'))	//???????????????
			cout<<str[i];
		else
			continue;														//????
	}
	return 0;
}
/**
 * ? ? ??????
 * ?    ?????
 * ????: 2010?12?09?
 * ????????????????????
*/
int main()		
{
	char a[31];				//?????
	int i, len;				//????len????????
	char *p = NULL;			//??????p?????		
	cin.getline(a,31);
	len = strlen(a);		//????????
	for ( p = a; p < a + len; p++ )		
	{
		if ( *p >= '0' && *p <= '9' )		//????????
			cout << *p;
		else								//???????????????
		{
			if ( *(p+1) < '0' || *(p+1) > '9' )		//??????????????????
			{
			}
			if ( *(p+1) >= '0' && *(p+1) <= '9' )	//????????????
			cout << endl;
		}
	}
	return 0;
}
int main()
{ char *a,*p;
  int i,t,n;
  a=(int *)malloc(30*sizeof(char));
  gets(a);
  n=strlen(a);
  p=a;t=0;
  for (i=0;i<=(n-1);i++)
    {if (*(p+i)>=48&&*(p+i)<=57) {printf("%c",*(p+i));t=0;}
        else if (t==0){printf("\n");t=1;}
     }
  free(a);
}
int main()
{
char a[31];
char *p=a;
cin.getline(a,31);
for(;*p!='\0';p++)
if(*p>=48&&*p<=58)
{
cout<<*p;
if(*(p+1)<48||*(p+1)>58)cout<<endl;
}
return 0;
}
int main()
{
	int n,i;char a[30];       //??????????????
	while(cin >> a)           //???????
	{
		n=strlen(a);          //?????
		for(i=0;i<n;i++)      //???
		{
			if(a[i]=='1'||a[i]=='0'||a[i]=='2'||a[i]=='3'||a[i]=='4'||a[i]=='5'||a[i]=='6'||a[i]=='7'||a[i]=='8'||a[i]=='9')
					cout<< a[i];
			else 
				{
					if(a[i-1]=='1'||a[i-1]=='0'||a[i-1]=='2'||a[i-1]=='3'||a[i-1]=='4'||a[i-1]=='5'||a[i-1]=='6'||a[i-1]=='7'||a[i-1]=='8'||a[i-1]=='9')
						cout << endl;
				}
		}
	}
	return 0;
}
int main()
{
	int i,j,a=0;
	char c[50]={'\0'};
	gets(c);
	for(i=0;i<strlen(c);i++){
		if(c[i]!='\0'){
			if(c[i]>47&&c[i]<58){
				for(j=i;j<=strlen(c);j++){
					if(c[j]<48||c[j]>57){
						printf("\n");
						i=j;
						break;
					}
					printf("%c",c[j]);
				}
			}
		}
	}
	return 0;
}
int main()
{
	char str[31];
	gets(str);
	int i=0;
	int num=0;
	while(str[i]!='\0'){
		if(str[i]>='0'&&str[i]<='9'){
			num=num*10+(str[i]-'0');
			if(!(str[i+1]>='0'&&str[i+1]<='9')||str[i+1]=='\0'){
				cout<<num<<endl;
				num=0;
			}
		}
		i++;
	}
	return 0;
}
int main(int argc, char* argv[])
{   
	char s[31];
	int i;
	gets(s);
	for(i=0;i<strlen(s);i++){
		if(s[i]<58&&s[i]>47)printf("%c",s[i]);
		if(s[i]<58&&s[i]>47&&(s[i+1]>=58||s[i+1]<=47))printf("\n");
	}
	return 0;
}
int main()
{
    char a[100];
    memset(a,0,sizeof a);

    cin.getline(a,100);
    int i,num=0;

    for(i=0;;i++)
    {
        if((a[i]>='0'&&a[i]<='9')&&(a[i+1]>='0'&&a[i+1]<='9'))
        {
            cout<<a[i];
        }
       if((a[i]>='0'&&a[i]<='9')&&(a[i+1]<'0'||a[i+1]>'9')) cout<<a[i]<<endl;
        if(a[i]==0) break;
    }




    return 0;
}
int main()
{
	int i,o[31];
	char b[31];
	cin.getline(b,31);
	for(i=0;i<=30;i++)
	{
		*(o+i)=*(b+i);
		if(*(o+i)>=48&&*(o+i)<=57)
			cout<<*(b+i);
		else if((*(o+i)<48||*(o+i)>57)&&(*(o+(i-1))>=48&&*(o+(i-1))<=57))
			cout<<endl;
	}
	
	return 0;
}
int main()
{   
	char str[31];
	gets(str);

	char * p=str;


	int flag=0;
	while(p<str+strlen(str))
	{
		if((*p>='0')&&(*p<='9'))
			{
				cout<<*p;
				flag=1;
		    }
		else
			{  
				if(flag==1)
				   cout<<endl;
				flag=0;
		     }
		p++;
	}

	return 0;
}
//???2010?12?8?

//???1000010586_???

//???????

int main()
{
	int i;
	char str[ 31 ];
	char *p;
	cin.getline( str , 31 );
	p = str;
	for( ; *p != '\0' ; p++ )
	{
		if ( *p >= '0' && *p <= '9' )
		{
			for ( i = 0 ; *( p + i ) != '\0' ; i++ )
			{
				if ( *( p + i ) < '0' || *( p + i ) > '9' )
				{
					p = p + i;
					cout << endl;
					break;
				}
				cout << *( p + i );
				if ( *( p + i + 1 ) == '\0' )
				{
                    p = p + i;
					cout << endl;
					break;
				}
			}
		}
	}
	return 0;
}
/*
 * tqsz.cpp
 *
 *  Created on: 2010-12-31
 *      Author: dell
 */
int main(){
	int s,i,longs;
	char zfc[50];
	cin.getline(zfc,50);
	longs=strlen(zfc);
	for(i=0;i<longs;i++){
		if(zfc[i]>47&&zfc[i]<58){
		s=zfc[i]-48;
			cout<<s;
		}
		else
			cout<<endl;
	}
}
void main()
{
  char *p;
  int i;
  p=malloc(31*sizeof(char));
  gets(p);
  for(i=0;i<31;i++)
  {
    if(*(p+i)=='\0')break;
    else if(*(p+i)>47&&*(p+i)<58)printf("%c",*(p+i));
    if(*(p+i+1)<48||*(p+i+1)>57)printf("\n");
  }
}
int main()
{
	char str[200],*point=str;
	cin.getline(str,150);
	for(;point<=str+strlen(str)-1;point++)
	{
		if(*point>='0'&&*point<='9')
		{
			while(*point>='0'&&*point<='9')
			{
				cout<<*point;
				point++;
			}
			cout<<endl;
		}
	}
	return 0;
}
int main()
{
	char buff[50] = {0};
	cin.getline(buff,50);
	int len = strlen(buff);
	int num = 0;
	for (int i = 0 ; i < len ; i ++)
	{
		if (buff[i] >= '0' && buff[i] <= '9')
		{
			num = 10 * num + buff[i] - '0';
			if (buff[i + 1] == '\0')
			{
				cout << num << endl;
			}
		}
		else
		{
			if (buff[i - 1] >= '0' && buff[i - 1] <= '9')
			{
				cout << num << endl;
				num = 0;
			}
		}
	}
	return 0;
}
int main()
{
	char a[30];
	gets(a);
	int i,m=strlen(a);
	for(i=0;i<m-1;i++)
	{
		if(a[i]>='0'&&a[i]<='9')
		printf("%c",a[i]);
		else
		{
			if(a[i+1]>='0'&&a[i+1]<='9')
			printf("\n");
		}
	}
	if(a[m-1]>='0'&&a[m-1]<='9')
	printf("%c",a[i]);
	return 0;
}
int main()
{	char n[31];
	int i,u;
	gets(n);
	for(i=0;i<strlen(n);i++){
		if(n[i]<='9'&&n[i]>='0'){
		printf("%c",n[i]);
		u=1;
		}
		else{
			if(u)
				printf("\n");
			u=0;
		}
	}
	return 0;
}
int main()
{
	int i;
	char a[30]={'\0'};
	gets(a);
	for(i=0;i<30;i++)
	{
		if(a[i]<=57&&a[i]>=48)
		{
			printf("%c", a[i]);
		}
		else 
		{if(a[i-1]>=48&&a[i-1]<=57&&a[i]!='\0')
		    {printf("\n");}
		 else 
			{if(a[i]=='\0') break;
			 else continue;}
		}
	}
	return 0;
}
main()
{
  int i,n;
  char *p;
  p=(char*)malloc(30*sizeof(char));
  gets(p);
  n=strlen(p);
  for(i=0;i<n;i++)
  {
   if(*(p+i)>='0'&&*(p+i)<='9')
    printf("%c",*(p+i));
   if((*(p+i)<'0'||*(p+i)>'9')&&(*(p+i-1)>='0'&&*(p+i-1)<='9'))
    printf("\n");
  }
  free(p);
}
int main()
{
	char str[31],*p;            //???????
	p=str;                      //???????
	cin.getline(str,31);        //?????
	for(int j=0;*(p+j)!='\0';j++)   //??????????????
	{
		if( *(p+j)>=48 && *(p+j)<=57 )    //?????????
			cout<<*(p+j);
		else if( (*(p+j-1)>=48 && *(p+j-1)<=57) && !(*(p+j)>=48 && *(p+j)<=57) )//???????????????????
			cout<<endl;
	}
	return 0;
}
int main()
{
int i=0,b=0,a,flag=0;
char str1[200];
cin.getline(str1,200);
a=strlen(str1);
char *p;
p = str1;
while (i<a)
{
 	  if (str1[i]<'0' || str1[i]>'9') 
 	  {
	  p++;
	  i++; 
	  continue;
	  }
	  cout << *p;
	  if (str1[i+1]<'0' || str1[i+1]>'9') 
	  {
			cout<<endl;
			
	  		flag++;
 	   }
 	  
			p++;
	  		i++;
			

}

}
int main()
{
	char str[40];
	cin.getline(str,40,'\n');
	char *p;
	p=str;
	int len=strlen(str);
	int i,j;
	for(i=0;i<=len-1;)
	{
                   if(*(p+i)=='0'&&(*(p+i+1)<'0'||*(p+i+1)>'9'))
                  {
                  cout<<*(p+i);
                   i++;
                    }
		else if(*(p+i)>='1'&&*(p+i)<='9')
		{
			for(j=0; ;j++)
			{
                                     

			if(*(p+i+j)>='0'&&*(p+i+j)<='9'&&i+j<=len-1)
					cout<<*(p+i+j);
				else
				{
					cout<<endl;
					i=i+j;
					break;
				}
			}
		}
	else
              i++;
             }
   return 0;
}
int main()
{
	char str[40];
	char *p=str;
	cin.getline(str,31);
	for(;*p!='\0';p++)
	{
		if(isdigit(*p)) cout<<*p;
		else cout<<endl;
	}
}
int main()
{
      char str[35],*p;
      int t,i,l=0;
      gets(str);
      p=str;
      for(i=0;*(p+i)!='\0';i++)
      {
            if(*(p+i)>='0' && *(p+i)<='9')
            {
                  cout<<*(p+i);
                  t=1;
            }
            else
                  t=0;
            if(t==0&&*(p+i-1)>='0'&&*(p+i-1)<='9')
            	cout<<endl;
            l++;
      }
      if(*(p+l-1)>='0'&&*(p+l-1)<='9')
            cout<<endl;
      return 0;
}
//****************************************************************************
//????????????????                                           *
//????wayne                                                              *
//?????12.4                                                             *
//****************************************************************************
int main()
{
	char str[30];
	gets(str);                         //?????????
	int len,flag;                      //?flag????????
	char *p=str;                       //????????
	len=strlen(str);                   //???????
	for (;p<=&str[len-1];p++) 
	{
		if (*p=='-')                    //??????
		{
			for (p++;p<=&str[len-1];p++)
			{
				if (*p>=48&&*p<=57)   //???????
					continue;
				else                  //??????????
				{
					cout<<endl;       //??????
					flag=1;           //flag???1????????????
					break;
				}
			}
		}
		else 
		{
    		if (*p>=48&&*p<=57)     //??????
			{
		    	cout<<*p;
		     	flag=0;             //??flag???0???????????
			}
	    	else if (flag==0)      //?????? flag??
			{ 
		    	cout<<endl;        //??
		    	flag++;            //????????
			}
		}
	}
	return 0;
}
int main()
{
	char s[31];
	int i,j,k,a[31];
	gets(s);
	k=strlen(s);
	for(i=0;i<31;i++)
	{
		a[i]=-1;
	} 
	for(i=0;i<k;i++)
	{
		if(s[i]-'0'>=0&&s[i]-'0'<=9)
			a[i]=s[i]-'0';
	}
	for(i=0;i<k;i++)
	{
		if(a[i]!=-1&&a[i+1]!=-1)
		    printf("%d",a[i]);
		else if(a[i]!=-1&&a[i+1]==-1)
		    printf("%d\n",a[i]);
	}
	return 0;
}
/**
 *@ file    1000012834_003homework.cpp
 *@ author  ???
 *@ date    2010-12-9
 *@ description 
 *          ???????????
 */
int main()
{
	char *p;		// ????????????p
	char str[50];		// ?????????str
	cin.getline(str,31);	// ?????????
	p = str;		// ????????
	while(*p != 0)		// ??????????
	{
		while((*p >= '0') && (*p <= '9'))	// ??????
		{
			cout << *p;	// ??????
			p++;		// ?????????????
		}
		cout << endl;	// ???????????

		// ?????????????????????????????
		while(!((*p >= '0') && (*p <= '9')) && (*p != 0))
			p++;
	}

	return 0;
}
/*
 * 0pointer_find the number.cpp
 *
 *  Created on: 2013-12-6
 *      Author: Administrator
 ?????????????30????????????????????????????????????????
????
?????,?????30
????
???????????,??????. (??????)
????
123*456U17960? 302tab5876
????
123
456
17960
302
5876*/
int main(){
	int l;
	char str[30],str2[30];
	gets(str);
	l=strlen(str);int k=0;
	char *p;
	p=str;
	for(int i=0;i<l;i++)
	{

		if(*(p+i)<'9'+1&&*(p+i)>'0'-1){
			str2[k]=*(p+i);
			k++;
			str2[k]='\0';
			if(*(p+i+1)>'9'||*(p+i+1)<'0')
			{
				cout<<str2<<endl;
				k=0;
			}
	}
	}
	return 0;
}
int main()
{
	char s[30];
	char *p;
	gets(s);
	p=&s[0];
	for( ;p<p+30;p++){
		if(*p>='0'&&*p<='9')
			printf("%c",*p);
		else if(p>s){
			if(*(p-1)>='0'&&*(p-1)<='9')
				printf("\n");
		}
		if(*p=='\0') break;
	}
	return 0;
}
void main()
{
	char c[30],*p;
	int num=1;
	gets(c);
	for(p=c;*p!='\0';p++)
	   {
	   if((*p>47)&&(*p<58))
	      {
		  if(num==1)
	      {
		  printf("%c",*p);
		  num=1;
	      }
          else
          {
		  printf("\n%c",*p);
		  num=1;
          }
	      }
       else
          num=0;
	   }
}
int main()
{
	char s[40];
	cin.getline(s,40);
	for(int i=0;i<strlen(s);i++)
	{
		if(s[i]<48||s[i]>57)continue;
		if(s[i]>47&&s[i]<58)
		{
			if(s[i+1]<48||s[i+1]>57)
			{
				cout<<s[i]<<endl;
			}
			else 
			{
				cout<<s[i];
			}
		}
	}


	return 0;
}
int main(int argc, char* argv[])
{
	int i;
	char string[30];
	gets(string);
	for(i=0;i<30;i++){
		if(string[i]=='0'||string[i]=='1'||string[i]=='2'||string[i]=='3'||string[i]=='4'||string[i]=='5'||string[i]=='6'||string[i]=='7'||string[i]=='8'||string[i]=='9'){
	printf("%c",string[i]);}
	else{
	printf("\n");}}
return 0;}
int main()
{
    char a[1000];
    cin.getline(a,1000);
    char *p;
    p = a;
    int b;
    b = strlen(a);
    for(;p<a+b;)
    {
       if((*p>='0')&&(*p<='9'))
       {
          cout << *p;
          p++;
          if((*p<'0')||(*p>'9'))
          cout << endl;
       }
       else
       p++;
    }
    return 0;
}
int main()
{
char a[30];
int i,ok;
gets(a);
for (i=0;i<strlen(a);i++)
if (!(*(a+i)>='0'&&*(a+i)<='9'))
{
	ok=1;
	continue;
}
else 
{
if (ok) printf("\n");
ok=0;
printf("%c",*(a+i));
}
return 0;
}
void main()
{char *p,q[31];
int a,n,i;
p=(char*)malloc(30*sizeof(char));
p=q;
gets(p);
n=strlen(p);
a=*p;
for(i=0;i<n;i++,p++)
{
if(*p>='0'&&*p<='9')
{
printf("%c",*p);
}
else
{
for(;*p<'0'||*p>'9';i++)
{p++;}
p=p-1;i=i-1;
if(a<'0'||a>'9')
{a='0';}
else {printf("\n");}
}
}
}
/*???????4
  ????00948344 ??
  ?????2010//12/31
*/


int main()
{
	char str[31];
	gets(str);
	int len=strlen(str);
	int i,j;
	for(i=0;i<len;i++)
	{   
		if(str[i]=='0'&&str[i+1]=='0')
			continue;
		else if((str[i]=='0')&&((str[i+1]<'0')||(str[i+1]>'9')))
		{
			cout<<"0"<<endl;
		}
		else if(str[i]>'0'&&str[i]<='9')
		{
			for(j=i;j<len;j++)
			{
				if(str[j]<'0'||str[j]>'9')
				{
					i=j-1;
					break;
				}
				if(j==len-1)
					i=j;
				cout<<str[j];
			}
		    cout<<endl;
		}
	}
	return 0;
}
int main()
{
 char s[50];
 cin.getline(s,51);
 int i=0;
 while(s[i]!='\0')
 {
   while(s[i]<=57&&s[i]>=48)
   {
	   cout<<s[i];i++;
	   if(s[i]>57||s[i]<48) cout<<'\n';
   }
   i++;
 }
 return 0;
}
//@@@@???????@@@@@@@@@@@//
//@@@@?????@@@@@@@@@@@@@@@//
//@@@@???12/11@@@@@@@@@@@@@@//
int main()
{
	char str[31];
	int i,j,l,a[31]={0};
	cin.getline(str,31);
	l=strlen(str);
    for(j='0';j<='9';j++)
	{
		if(str[0]==j)
		{
			cout<<str[0];
			a[0]=1;
			break;
		}
	}
	for(i=1;i<l;i++)
	{
		for(j='0';j<='9';j++)
		{
			if(str[i]==j)
			{
				cout<<str[i];
				a[i]=1;
				break;
			}
		}
		if(a[i-1]==1&&j=='9'+1)cout<<endl;
	}
}
int main()
{
	char a[31];
	int i,len,p=1;
	gets(a);
	len=strlen(a);
	if(a[0]>='0'&&a[0]<='9')
		cout<<a[0];
	for(i=1;i<len;i++)
	{
		if(a[i]>='0'&&a[i]<='9')
		{
			  if(p==0)
				  cout<<endl;
				cout<<a[i];
				p=1;
		}
	    else
        {
			p=0;
		}
	}
	return 0;
}
int main()
{
	char hello[33];
	int count,i=0;
	
	cin.getline(hello,33);
	
	
	while(hello[i]!='\0')
	{
		
		if(hello[i]>='0'&&hello[i]<='9') 
			{
				cout<<hello[i];
				count=0;
		    }
		else
		{
			if(count==0) 
				{
					cout<<endl;
					count++;
			    }
			
		}
		i++;
	}
	cout<<endl;
	return 0;
}
/*
 * findnum_0.cpp
 *
 *  Created on: 2013-12-6
 *      Author: ??
 */
int main(){
	char a[45],*p=a;int go[45],i,j=0;
	cin.getline(a,45);
	for(i=0;*(p+i)!='\0';i++){
		if(*(p+i)>=48&&*(p+i)<=57){
			go[j]=i;
			for(i=go[j];;i++){
				if(*(p+i)<48||*(p+i)>57){
					//end[j]=i-1;
					*(p+i)='\0';
					j++;
					break;
				}
			}
		}
	}
	p=a;
	for(i=0;i<j;i++){
		cout<<p+go[i]<<endl;
	}
	return 0;
}
void main()
{
 char a[40];
 int i=0,m=0;
 gets(a);
 while(*(a+i)!='\0')
  {
    if(*(a+i)>='0'&&*(a+i)<='9') {printf("%c",*(a+i));m=1;}
    else if(m==1&&*(a+i+1)>='0'&&*(a+i+1)<='9') printf("\n");
    i++;
   }
}
int main() {
	char str[32];
	cin.getline(str, 33);
	int len = strlen(str), i, j, k;
	for (i = 0; i < len; i++)
		if (*(str + i) >= '0' && str[i] <= '9') { //?????????????????????
			for (j = 1; *(str + i + j) >= '0' && *(str + i + j) <= '9'; j++)
				;
			for (k = 0; k < j; k++)
				cout << *(str + i + k);
			cout << endl;
			i += j - 1;
		}
	return 0;
}
/*
 * 4.1.cpp
 *
 *  Created on: 2011-1-8
 *      Author: ???
 *        ??? ????
 */



int main(){
	char c[31],str[31];
	cin.getline(c,31);
	int m=strlen(c);
	for(int i=0;i<m;i++){
		if(c[i]=='0')//??0?????
			if(c[i+1]!='0'){
				cout<<0<<endl;
				continue;
			}
		if(!(c[i]>='1'&&c[i]<='9'))//??????
			continue;
		else{
			int j;
			for(j=0;c[i]>='0'&&c[i]<='9';i++,j++)//?????????
				str[j]=c[i];
			str[j]=0;
			cout<<str<<endl;
		}
	}
	return 0;
}
int main()
{
	char C[500];
	char *P;
	gets(C);
	P = C;
	int L = strlen(P);
	for (int I = 0; I < L; I ++)
		if (P[I] >= '0' && P[I] <= '9')
		{
			int J;
			for (J = I; J < L; J ++)
				if (P[J] >= '0' && P[J] <= '9') cout << P[J]; else break;
			I = J;
			printf("\n");
		}
}
int main()
{
    char *p;
    p=(char *)malloc(1000*sizeof(char));
    gets (p);
    int i;
    for (i=0;*(p+i)!='\0';i++)
    {
        if (isdigit(*(p+i)))
        printf ("%c",*(p+i));
        if (isdigit(*(p+i))&&isdigit(*(p+i+1))==0)
        printf ("\n");
    }
    return 0;
}
int main()
{
	char a[32];
	int i, flag = 0;
	cin.getline(a, 32);
	for(i = 0;a[i] != '\0';i++)
	{
		if(a[i] - '0' < 10 && a[i] - '0' > -1)
		{
			cout << a[i];
			flag = 1;
		}
		else if(flag == 1)
		{
			cout << endl;
			flag = 0;
		}
	}
	cout << endl;
	return 0;
}
void main()
{

char *p,*r;
p=(char*)malloc(30*sizeof(char));
gets(p);

for(r=p;*r!='\0';r++)
if ((*r>57)||(*r<48)) printf("\n");
else printf("%c",*r);

}
int main ()
{
	int i,j=0;
	char c[30],str[30];
	gets(c);
	for (i=0;c[i-1]!='\0';i++)
		if(c[i]<='9'&&c[i]>='0')
			str[j]=c[i],j++;
		else
			if(j!=0)
			str[j]='\0',printf("%s\n",str),j=0;
		return 0;
}
int main ()
{
	char c[31];
	cin.getline(c,31);
	int n = sizeof(c);
	for (int i = 0; i < n; i++)
	{
		if (isdigit(c[i]))
			cout << c[i];
		else
			cout << endl;
	}
	return 0;
}
/*???:????
**???:??
**?  ?:2010?12?10?
*/
int main()
{
	char str[31], *p[20], *q;
	int i, j, l;//???????????????
	cin.getline(str, 31);
	l = strlen(str);
	i = 0;
	for (q = str; *q != '\0'; q++)//??
	{
		if (*q >= '0' && *q <= '9')//????
		{
			p[i++] = q;//????
			for (p[i] = q + 1; p[i] <= str + l; p[i]++)//?????,???????????'\0'
				if (*p[i] < '0' || *p[i] > '9')//???????????
				{
					q += p[i] - p[i-1];//???????????????????????
					i++;
					break;
				}
		}
	}
	for (j = 0; j < i; j = j + 2)
	{
		for (q = p[j]; q < p[j+1]; q++)
			cout << *q;//??????
		cout << endl;
	}
	return 0;
}
int main()//????
{
	int i,j=0,k=0,len;
	char str[31];
	char num[30][30];
	memset(num,'\0',sizeof(num));
	cin.getline(str,31);
	len=strlen(str);
	for(i=0;i<len;i++)//???????????
	{
		if(str[i]>='0' && str[i]<='9')
		{
			num[j][k]=str[i];
			k++;
		}
		else if(str[i-1]>='0' && str[i-1]<='9')
		{
			j++;
			k=0;
		}
	}
	for(i=0;i<=j;i++)//????
		cout<<num[i]<<endl;
	return 0;
}
//********************************
//????1000012825             *
//??????                   *
//???12.10                    *
//?????????             *
//********************************
int main ()
{
	char str[30];
	cin.getline( str, 31);
	char *p = str;
	int flag = 0;  //???????
	for ( p = str; *p != '\0'; p++ )
	{
		if ( *p >= '0' && *p <= '9')
		{
			cout << *p;
			flag = 1;  //????????????flag = 1
		}
		else
		{
			if ( flag == 1)
			{
				cout << endl;
				flag = 0;	//????????flag = 0,???????????????
			}
		}
	}
	cout << endl;
	return 0;
}
//??????
int main()
{
	char a[31];
	int i,n,j=0;
	cin.getline(a,31);
	n=strlen(a);
	char *p[30]; 
	for(i=0;i<n;i++)         
	{
		if(a[i]<'0'||a[i]>'9')              //??????????
		{
			a[i]=0;                      //??????
			if (i<n-1 && a[i+1]>='0'&&a[i+1]<='9')           //??????????????
			{ 
				p[j]=a+i+1;                    //??????????
				j++;
			}
		}
	} 
	if (a[0])                    //???????????0??????????
		cout<<a<<endl;
	for(i=0;i<j;i++)                   //???0??????????????
		//if (a[i]>='0' && a[i]<='9' && (!i || a[i-1]==0))
		cout<<p[i]<<endl;                   //??????????
	return 0;
}