semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int j,flag[40],start[40],end[40];
    char a[31];
    cin.getline(a,31,'\n');
    int i=0,count=0;
    if(a[i]>'0'&&a[i]<'9') 
    {
                           flag[i]=1;
                           start[1]=0;
    }
    else flag[i]=0;
    for(i=1;i<=30;i++)
    {
                  if(a[i]>='0'&&a[i]<='9') 
                  {
                                         flag[i]=1;
      
                  }
                  else flag[i]=0;
                  if(flag[i-1]==0&&flag[i]==1) 
                  {
                                               start[count+1]=i;
                  }
                  if(flag[i-1]==1&&flag[i]==0)
                  {
                                              count++;
                                              end[count]=i-1;
                  }
 
    }
    for(i=1;i<=count;i++)
    {
                         for(j=start[i];j<=end[i];j++)
                         {
                                                      cout<<a[j];
                         }
                         if(i!=count) cout<<endl;
    }
    return 0;

}
int main()
{
	char c[30];
	int i,x=0,y=0;
	gets(c);
	for(i=0;i<30;i++)
	{
	y=y+1;	
	if(c[i]=='\0')
			break;
	}
	for(i=0;i<y;i++)
	{
		if(c[i]=='1'||c[i]=='2'||c[i]=='3'||c[i]=='4'||c[i]=='5'||c[i]=='6'||c[i]=='7'||c[i]=='8'||c[i]=='9'||c[i]=='0')
		{
			printf("%c",c[i]);
		x=0;
		}
		else
		{
			if(x==0)
			printf("\n");	
			x=x+1;
		}
	}
	return 0;
}
void main()
{
	char *c;
	int n,i,s=0,p=0;
	c=(char*)malloc(30*sizeof(char));
	gets (c);
	n=strlen (c);
	for (i=0;i<n;i++)
	if (*(c+i)>=48&&*(c+i)<=57)  { s=s*10+(*(c+i)-48); p=1;}
    else if (p) {printf ("%d\n",s); s=0;p=0;}
	 if (p) printf ("%d\n",s);  
}
int main()
{
	char *p = NULL ;
	char str[100] ;
	cin.getline(str,100) ;
	p = str ;
	int len = strlen(str) ;
	for ( p = str ; p < str + len ; p++ )
	{
		if ( (int)*p >= 48 && (int)*p <= 57 )
		{
			if ( ((int)*(p - 1) < 48 || (int)*(p - 1) > 57) && p != str )
			{
				cout << endl ;
			}
			cout << *p ;
		}
	}
	cout << endl ;
	return 0 ;
}
int main()
{
	char ch[50];
	int i,j,t1=0,t2=0,n=0,l;
	cin.getline(ch,40,'\n');
	l=strlen(ch);
	n=0;
	for(i=0;i<l;i++)
	{
		if(ch[i]>=48&&ch[i]<=57)
		{
			if(t1==0)t1=1;
			n*=10;
			n+=ch[i]-48;
		}
		else
		{
			if(t1==1)cout<<n<<endl;
			n=0;
			t1=0;
		}
	}
	if(t1==1)cout<<n<<endl;
	return 0;
}
char c[101], *p;
int s;
int main()
{
    cin.getline(c, 101);
    s = -1;//?s????????????????????
    p = c;
    do
    {
        if (*p <= '9' && *p >= '0')//??????????s??
        {
            if (s == -1)
                s = 0;
            s = s * 10 + *p - '0';
        }
        else//????????????
        {
            if (s != -1)
                cout << s << endl;
            s = -1;
        }
    }while(*p++);
    return 0;
}
//****************************************************************************************
//*  ??????? 																	 *
//*  ????????????????30???????????????????????    *
//*  ???????					   													 *
//*  ???2010?12?8?															     *
//****************************************************************************************
int main()
{
	char str[31];										//?????
	int num, i, j, p = 0;								//????
	cin.getline (str, 31);								//?????
	num = strlen(str);									//????????
	for (j = 0; j < num; j++)							//???????????????
	{
		if ((*(str + j) >= '0') && (*(str + j) <= '9'))
		break;
	}
	for (i = j; i < num; i++)							//?????????
	{
		if ((*(str + i) >= '0') && (*(str + i) <= '9'))
		{
			if (p > 0)
			{
				cout << endl;
				p = 0;
			}
			cout << *(str + i);
		}
		else 
			p++;
	}
	cout << endl;
	return 0;
}
void main()
{
	char *p,c,*q;
	int s=1,i=0;
	p=(char *)malloc(40*sizeof(char));
	do
	{
		c=getchar();
		p[i]=c;
		
		i++;
	}
	while(c!='\n');
	q=p;
	for(;*q!='\n';q++)
	{
		

		if(*q>='0'&&*q<='9')
		{
			
				printf("%c",*q);
		       s=0;
		}
		if((s==0 )&& (*q<'0'||*q>'9'))
		{
			printf("\n");
			s=1;
		}
	}
}
/*
 *????????
 *?????
 *??: 2011-1-7
 */


int main(){
    char s[100];
    cin.getline(s,100);
    int i=0;
    while(i<strlen(s)){
    	while(s[i]-'0'<=9&&s[i]-'0'>=0){
    		cout<<s[i];
    	    i++;
    	}
    	cout<<endl;
    	while(!(s[i]-'0'<=9&&s[i]-'0'>=0)&&i<strlen(s)){
    	    i++;
    	}
    }
	return 0;
}
int main()
{
	int n;
	char a[320];
	cin.getline(a,31,'\n');
	n=strlen(a);
	if('0'<=a[0]&&a[0]<='9')
	{cout<<a[0];}
	for(int i=1;i<n;i++)
	{
		if('0'<=a[i]&&a[i]<='9')
		{cout<<a[i];}
		else if(a[i-1]>='0'&&a[i-1]<='9')
		{cout<<endl;}
		else continue;
	}
	cout<<endl;
	return 0;
}
main()
{
      char s[2000];
      gets(s);
      int i;
      for(i=0;s[i]!='\0';i++)
      {if(s[i]>=48&&s[i]<=57&&s[i+1]>=48&&s[i+1]<=57)
      printf("%c",s[i]);
      if(s[i]>=48&&s[i]<=57&&(s[i+1]<48||s[i+1]>57))
      printf("%c\n",s[i]);}
      getchar();
      getchar();
      return 0;
      }
int main()
{
	int i, len;
	char str[40], *q;
	cin.getline(str, 40);
	len = strlen(str);
	q = str;
	for( i = 0; i < len; i++ )
	{
		if( *(q + i) - '0' >= 0 && *(q + i) - '0' <= 9 )
		{
			cout << *(q + i);
			if( *(q + i + 1) - '0' < 0 || *(q + i + 1) - '0' > 9 )
				cout << endl;
		}
	}
	return 0;
}
int main(){
    char aa[100];
    int i;
    i=0;
     gets(aa);
    while(aa[i]!='\0'){
      if(aa[i]<=57&&aa[i]>=48){
      cout<<aa[i];
      if(aa[i+1]>57||aa[i+1]<48)
      cout<<endl;
      }
      i++;
      }
      return 0;
      }
int main()
{
	char c[1000];
	char *str=c;
	int flag,k;
	flag=1;
	k=0;
	gets(str);
	while(*str)
	{
		if((*str>='0'&&*str<='9')&&(flag==0)&&(k>0))
			printf("\n");
		if(*str>='0'&&*str<='9')
		{
			printf("%c",*str);
			flag=1;
			k++;
		}
		else
		{
			flag=0;
		}
		str++;

	}
	
		return 0;
}
int main()
{
	char c[31];
    char *p;
	gets(c);
	int i,k=strlen(c);
    for(p=c;p<=c+k-1;p++)
	{
		if(*p<'0'||*p>'9')continue;
		else
		{
			printf("%c",*p);
			if(p<=c+k-2)
			{
				if(*(p+1)<'0'||*(p+1)>'9')printf("\n");
			}
			else printf("\n");
		}
	}
	return 0;
}
main(){
       char *p;
       int i,len;
       p=(char*)malloc(30);
       gets(p);
       len=strlen(p);
       for(i=0;i<len;i++){
           if(*(p+i)>=48&&*(p+i)<=57){
               printf("%c",*(p+i));
           }
           else if((*(p+i-1)>=48&&*(p+i-1)<=57)||*(p+i+1)=='\0'){
               printf("\n");
           }
       }
       printf("\n");
}
int main()
{
char c[1000];
gets(c);
int i,n,j,t=0;
n=strlen(c);
for(i=t;i<n;i++)
{
if((c[i]>='0')&&(c[i]<='9'))
cout<<c[i];
else
{
for(j=i;j<n;)
{
if((c[j]>='0')&&(c[j]<='9'))
{
cout<<endl;
t=j-1;
j=n;
}
else
j=j+1;
}
}
}
return 0;
}
int main()
{
	int i,l,k;
	char zfc[31];
	gets(zfc);
	l=strlen(zfc);
	for(i=0;i<l;i++){
		
		if((zfc[i]=='1')||(zfc[i]=='2')||(zfc[i]=='3')||(zfc[i]=='4')||(zfc[i]=='5')||(zfc[i]=='6')||(zfc[i]=='7')||(zfc[i]=='8')||(zfc[i]=='9')||(zfc[i]=='0')){
		printf("%c",zfc[i]);
		}else{
			printf("\n");
			for(k=i+1;k<l;k++){
				if(zfc[k]!='0'&&zfc[k]!='1'&&zfc[k]!='2'&&zfc[k]!='3'&&zfc[k]!='4'&&zfc[k]!='5'&&zfc[k]!='6'&&zfc[k]!='7'&&zfc[k]!='8'&&zfc[k]!='9'){
				i++;
				}else{
					break;
				}
			}
		}
	}
	return 0;
}
void main()
{
	int i,n;
	char *p;
	p=(char*)malloc(100*sizeof(char));
	gets(p);
	n=strlen(p);
	if((*p)>47&&(*p)<58)
		printf("%c",*p);
	for(i=1;i<n;i++)
	{
		if((*(p+i)>47&&*(p+i)<58)&&(*(p+i-1)<48||*(p+i-1)>57))
			printf("\n");
		if(*(p+i)>47&&*(p+i)<58)
			printf("%c",*(p+i));
	}
		
	
}
int main(){
	char f[10000];
	cin.getline(f,10000);
	for(int i=0;i<strlen(f);i++){
		if(f[i]-'0'>=0&&f[i]-'0'<=9)
			cout<<f[i];
		if((f[i]-'0'>=0&&f[i]-'0'<=9)==0&&(f[i+1]-'0'>=0&&f[i+1]-'0'<=9)==1)
			cout<<endl;
	}
	return 0;
}
int main()
{
	int i,q;
	char *p=NULL;
	char str[100];
	cin.getline(str,99);
	p=str;
	for(i=0;p[i];i++)
	{
		if(p[i]<='9'&&p[i]>='0'&&p[i-1]!='-')
		{
			cout<<p[i];
		
		if(p[i+1]>'9'||p[i+1]<'0')
		cout<<endl;
	    }
	}
	cin>>q;
	return 0;
}
//***************************************************************
//*?????????.cpp                                       *
//*??????                                                 *
//*?????2010?12?27?                                     *
//*??????????                                         *
//***************************************************************
int main()
{
	char letter[31];
	cin.getline(letter,31,'\n');//???????????
	int i=0;
	int j=0;
	int k=0;
	char temp[30][30];
	for(i=0;i<31;i++)
	{
		if(letter[i]>='0'&&letter[i]<='9')//?????????????
		{
			temp[k][j]=letter[i];
			j++;//?????
		}
		if((letter[i]<'0'||letter[i]>'9')&&(letter[i-1]>='0'&&letter[i-1]<='9'))//??????????
		{
			temp[k][j]='\0';//?????????
			cout<<temp[k]<<endl;//??
			k++;//k?????
			j=0;//??
		}
	}
	return 0;
}
int main()
{
	char sz[30];
	int i;
	gets(sz);
	for(i=0;i<30;i++){
		if((sz[i]>='0')&&(sz[i]<='9')){
			printf("%c",sz[i]);
		}else{
			printf("\n");
		}
	}
	return 0;
}
int main(){
	int i,j,m=0,c;
	char a[40];
	cin.getline(a,31);
	c=strlen(a);
	for(i=0;i<c;i++){
		if(a[i]>='0'&&a[i]<='9'&&!(a[i+1]>='0'&&a[i+1]<='9')){
			for(j=m;j<=i-1;j++){
				if(a[j]>='0'&&a[j]<='9')cout<<a[j];
			}
			cout<<a[j]<<endl;
			m=i+1;
		}
		}
	return 0;
}
int main()
{
	int i,j,len;
	char s[100];
	gets(s);
	len=strlen(s);
	for(i=0;i<len;i++)
	{
		if((s[i]>='0')&&(s[i]<='9'))
		{
			for(j=i;;j++)
			{
				if((s[j]>='0')&&(s[j]<='9'))	
				{
					cout<<s[j];
					s[j]='*';
				}
				else
					break;
			}
			cout<<endl;
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	char s[31],temp[31];
	int j=0,c=0;
	gets(s);
	while(s[j]!='\0')
	{
		if(s[j]>='0'&&s[j]<='9')
		temp[c++]=s[j];
		else 
		{
			temp[c]='\0';
			c=0;
			printf("%s\n",temp);
		}
		j++;
	}
	temp[c]='\0';
	printf("%s",temp);
	return 0;
}
int main()
{
	char shuru[500];
	cin.getline(shuru,500);
	int a = 0, i = 0;
	a = strlen(shuru);
	if(shuru[0] >= '0' && shuru[0] <= '9')
		cout << shuru[0];
	for(i = 0; i <= a - 1; i++)
	{
		if(i != 0)
		{
			if(shuru[i] >= '0' && shuru[i] <= '9')
				cout << shuru[i];
			if((shuru[i] < '0' || shuru[i] > '9') && (shuru[i - 1] >= '0' && shuru[i - 1] <= '9'))
				cout << endl;
		}
    }
	cout << endl;
	return 0;
}
int main()
{
    char z[30],*p;
	gets( z );
	p=z;
	int i;
	for ( i=0 ; z[i]!='\0' ; i++ )
	{
		if ( *(p+i)>='0'&&*(p+i)<='9' )
		{
			if ( ( *(p+i-1)>'9'||*(p+i-1)<'0' )&&i!=0 )
				cout<<endl;
			cout<<*(p+i);
		}
	}
	cout<<endl;
	return 0;
}
void main()
{
	char s[300];
	int a[300],i=0,j;
	gets(s);
	for(i=0;i<strlen(s);i++)
		a[i]=(int)s[i];//48-57?0-9???
	for(i=0;i<strlen(s);i++)
	{
		if(a[i]>47&&a[i]<58)
		{
			for(j=0;j<strlen(s)-i;j++)
			{
				if(a[i+j]>47&&a[i+j]<58)
				{
					printf("%c",s[i+j]);
					continue;
				}
				else
				{
					printf("\n");
					break;
				}
			}
			i=i+j;
		}
	}
}
int main()
{
    char a[999]={'\0'};
    
    int i;
    gets(a);
    
    for(i=0; a[i]!='\0'; i++)
    {
             if(a[i]>='0'&&a[i]<='9')
             {
                 printf("%c", a[i]);
                 if(a[i+1]<'0'||a[i+1]>'9')
                 printf("\n");
             }
    } 
    
    return 0;
}
int main()
{
int x=0;
char a[35];
gets(a);
for (int i=0;a[i]!='\0';i++)
   if (a[i]>='0'&&a[i]<='9')
     {
     printf("%d",a[i]-'0');
     for (int j=1;;j++)
        if (a[i+j]>='0'&&a[i+j]<='9')
          printf("%d",a[i+j]-'0');
        else {i=i+j-1;printf("\n");break;}
     }
}
int main()
{
	char zf[31];
	int i,j,k;
	gets(zf);
	for (i=0;zf[i]!='\0';i++){
		if (zf[i]=='0'||zf[i]=='1'||zf[i]=='2'||zf[i]=='3'||zf[i]=='4'||zf[i]=='5'||zf[i]=='6'||zf[i]=='7'||zf[i]=='8'||zf[i]=='9')
			printf("%c",zf[i]);
		else printf("\n");
	}
	return 0;
}
/*???:????
**???:??
**?  ?:2010?12?10?
*/
int main()
{
	char str[31], *p, *q;
	int sum;//?????????
	cin.getline(str, 31);
	for (q = str; *q != '\0'; q++)//??
	{
		sum = 0;
		if (*q >= '0' && *q <= '9')//????
		{
			sum += *q - '0';
			for (p = q + 1; *p <= '9' && *p >= '0'; p++)//?????,???????????'\0'
				sum = sum * 10 + *p - '0';//????
			cout << sum << endl;//??,??p???????
			if (*p == '\0')
				break;//?????,???
			q = p;//??????????,????????????????			
		}
	}
	return 0;
}
int main( )
{    int i,j;
char c[35],*p;
	 gets(c); //?????
	 for(p=c;*p!=0;p++)
	 { if (*p>=48&&*p<=57)           //????????
	 {  for (j=0;1;j++)
	 { if ((*(p+j))>=48&&(*(p+j)<=57))
	{ cout<<*(p+j);}
	 else {cout<<endl; break;}     //?????????????
		 }    
	 p=p+j-1;}
	 }
	return 0;}
int main()
{
    char s[31];
    cin.getline(s,31);                     //??????????
    int len=strlen(s);                     //????
    int flag=0;
    for(int i=0; i<len; i++)
    {
        if(*(s+i)>='0'&&*(s+i)<='9')   {cout<<*(s+i);flag++;}      //???????????????1
        else if(*(s+i+1)>=0&&*(s+i+1)<='9'&&flag)  cout<<endl;  //????????????????????????????????????
    }
    return 0;
}
int main(int argc, char* argv[])
{
	char str[40];
	int len,i,num=0;
	gets(str);
	len=strlen(str);
	for(i=0;i<=len-1;i++){
		if(str[i]>=48&&str[i]<=57){
			printf("%c",str[i]);
		}else if(i>0&&str[i-1]>=48&&str[i-1]<=57){
			printf("\n");
	        num+=1;
		}
		
	}
	if(str[len-1]>=48&&str[len-1]<=57){
			num+=1;
	}

	return 0;
}
//
//  main.cpp
//  hw
//
//  Created by ? ? on 12-12-19.
//  Copyright (c) 2012? ? ?. All rights reserved.
//

int number (char x)
{
    if (x>='0'&&x<='9') {
        return 0;
    }
    else
    {
        return 1;
    }
}
int main(int argc, const char * argv[])
{
    char str[LEN+3];
    gets(str);
    int len=strlen(str);
    str[len+1]='^';
    for (int i=0; i<len; i++) {
        if (number(str[i])) {
            str[i]=0;
        }
    }
    char *begin,*end;
    int k=0;
    while (str[k]==0) {
        k++;
    }
    begin=&str[k];end=&str[k+strlen(begin)];
    while (1) {
        cout<<begin<<endl;

        int i=1;
        while (*(end+i)==0&&*(end+i)!='^') {
            i++;
        }
        if (*(end+i)=='^') {
            break;
        }
        begin=end+i;
        end+=i+strlen(begin);
    }
    return 0;
}
int main()
{
	char a[31]; gets(a);
	int l; l=strlen(a);
	int i,j,k;
	for (i=0;i<l;i++)
	{
		if (a[i]>'0'&&a[i]<='9')
		{
			for (j=i+1;j<l;j++)
				if (a[j]>'9'||a[j]<'0')
					break;
			for (k=i;k<j;k++)
				cout<<a[k];
			i=j; cout<<endl;
		}
		else if (a[i]=='0')
			{
			for (j=i+1;j<l;j++)
				if (a[j]!='0')
					break;
			i=j-1; cout<<'0'<<endl;
			}
	}
	return 0;
}
void main()
{
 int i,j=0,k=0;
 char *p;
 p=(char *)malloc(30*sizeof(char));
 char (*q)[10];
 q=(char (*)[10])malloc(10*10*sizeof(char));
 char a[10][10];
 for(i=0;i<30;i++)
 scanf("%c",p+i);
 for(i=0;*(p+i)!='\0';i++)
 {
   if(*(p+i)>='0'&&*(p+i)<='9') {*(*(q+j)+k)=*(p+i);k++;}
   else 
       if(*(p+i+1)>='0'&&*(p+i+1)<='9')
       {
       *(*(q+j)+k)='\0';j++;k=0;
        }
  }
 for(i=0;i<=j;i++)
 printf("%s\n",*(q+i));
}
int main(){
int i,j;
j=0;
char zfc[31],jg[31];
gets(zfc);
for(i=0;zfc[i]!=0;i++){
	if(zfc[i]>='0'&&zfc[i]<='9'){
		jg[j]=zfc[i];
		if(zfc[i+1]>='0'&&zfc[i+1]<='9'){
			j++;
			continue;
		}else{
			jg[j+1]=0;
			puts(jg);
			j=0;
		}
	}
}
    return 0;
}
int main()
{
   int step=0;     //step????????????????????????
   char *p,*q;     //p????????????q????????????
   char str[50];   //????????
   cin.getline(str,31,'\n');  //?????
   for(p=str;p<str+31;p++)    
   {

      if(*p<'0' || *p>'9')    //????
        continue;
      else       
      {
          for(q=p;q<str+31;q++)  //?q??p
          {
              if(*q>='0' && *q<='9')  //???????????p??????????
              {
                 step++;
                 cout<<*q;
              }
              else 
              {
                 cout<<endl;
				 p=p+step;  //p???????
				 step=0;  //??
                 break;
              }
          }
      }
	  if(*p=='\n') break;
     
   }
   return 0;
}
int main()
{
	char a[1000];
	char *p[1000];
	int i;
	cin.getline(a,1000);
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]>='0'&&a[i]<='9')
		{
			p[i]=&a[i];
		}
		else
		{
			p[i]=NULL;
		}
	}
	for(i=0;i<strlen(a);i++)
	{
		if(p[i]!=NULL)
		{
			cout<<*p[i];
		}
		else if(p[i+1]!=NULL)
		{
			cout<<endl;
		}
	}
	return 0;
}
//**************************
//*????????        *
//*?????              *
//*?????2010?12?    *
//**************************
int main()
{
	char a[31];
	int n,j;
	cin.getline(a,31);           //?????
	n=strlen(a);
	for(int i=0;i<n;i++)
	{
		if(a[i]>='0'&&a[i]<='9')
		{
			for(j=i;a[j]>='0'&&a[j]<='9';j++)
			{
				cout<<a[j];
			}
			i=j;
			cout<<endl;
		}
	}                         //???????
	return 0;                  //??
}
int main(){
	char a[31];
	cin.getline(a,31);
	int b;
	b=strlen(a);
	int i=0,j;
	while(i<b){
		if(a[i]>'9'||a[i]<'0'){i++;continue;}

	for(j=i;(a[j]<='9')&&(a[j]>='0');j++)
	{
		cout<<a[j];
	}
	cout<<endl;
	i=j+1;
}
	return 0;
}
char a[10000];

int main()
{
	cin.getline(a,10000);
	char *p,*q=a;
	for(p=a;p<=a+strlen(a);)
	{
		if (*p>='0' && *p<='9')
		{
			p++;
		}
		else
		{
			for(;q<p;q++)
			{
				cout<<*q;
			}
			cout<<endl;
			while( p<=a+strlen(a) && (*p<'0' || *p>'9') ) p++;
			q=p;
		}
	}
	return 0;
}
void main()
{
	int i;
	char c[31];
	gets(c);
    char *p=c;
	for(i=0;c[i]!='\0';i++,p++)
		{if(*p>='0'&&*p<='9')
			printf("%c",*p);
		else 
		{ if(*(p+1)>='0'&&*(p+1)<='9')
			printf("\n");
	}
	}
	
}
int main()
{
	char *p = NULL;
	char a[31];
	cin.getline(a,31);
	int length = strlen(a), flag = 0;
	p = a;
	for (p = a; p < a + length; p++)
	{
		if ((*p - '0') >= 0 && (*p - '0') <= 9)
		{
			cout<<*p;
			flag = 0;
		}
		else if (flag == 0)
		{

			cout<<endl;
			flag = 1;
			continue;
			
		}
	}
	return 0;
}
char* getmemory(int num)
{
	char *p=(char*)malloc(num*sizeof(char));  //????????
	return p;
}

void main()
{
	char *str,*p1,*a;      // str?????????,???????????
	int m,k;               //a????????,
	str=getmemory(31);     //p1??????????
	gets(str);           
	p1=a=str;              //m???????????
	k=0;                   // k????????????
	for(;*str!='\0';)
	{
		if(*str<'0'||*str>'9')    //???????
		{	
			k+=1;
			if(*(str+1)>='0'&&*(str+1)<='9')  //????????
			{                                 //????????
				m=str-k-p1;
				if(p1==a){for(;p1<=str-k;p1++)printf("%c",*p1);printf("\n");}
				else {for(p1=p1+1;p1<=str-k;p1++)printf("%c",*p1);printf("\n");}
				p1=str;	
				k=0;
			}
		}
		str++;
	}
	if(p1==a)
		for(;p1<str-k;p1++)printf("%c",*p1);  //??????????????
	else
		for(p1=p1+1;p1<str-k;p1++)printf("%c",*p1);//????????

}
int main()
{
	char *org,*p;
	int num=0;
	org=(char*)malloc(30*sizeof(char));
	gets(org);
	for(p=org;*p!='\0';p++)
	{
		if(isdigit(*p)==0)
		{
			if(num==0)printf("\n");
			num++;
		}
		else
		{
			num=0;
			printf("%c",*p);
		}
	}
	free(org);
}
//?????_??(12-4) ????
//?????Empty output file: '3.out'
//??????
int main()
{
	char str[40] = {'\0'};
	int pos_c = 0, len = 0;             
	//???pos_c???????????
	//len:?????
	int i, j, k;

	cin.getline(str, 35);
	len = strlen(str);
	//l.15?l.19????????????????????????????
	for (i = len; i >= 1; i --)
		str[i] = str[i - 1];
	str[0] = 'a';
	str[++ len] = '\0';

	for (i = 0; i < len; i ++)
	{
		if (!isdigit(str[i]))                                   //???
		{
			if (i == pos_c + 1)                                 //?????????
				pos_c = i;
			else
			{
				int ok = 0;                                     //ok????????
				for (j = pos_c + 1; j < i; j ++)                //????????+1??????????-1??
				{ok = 1; cout << str[j];}
				if (ok) cout << endl;
				pos_c = i;                                      //????????
			}
		}
	}

	int ok = 0;
	for (j = pos_c + 1; j < len; j ++)                           //??????????????
	{ok = 1; cout << str[j];}
	if (ok) cout << endl;
	return 0;
}
void sort(int a[],int n)
{
	int t,i;
	t=a[n-1];
	for(i=n-1;i>0;i--)
		a[i]=a[i-1];
    a[0]=t;
}
void main()
{
	char s[300];
	int i,flag=0;
	gets(s);
	for(i=0;s[i]!='\0';i++)
		if(s[i]>='0'&&s[i]<='9') {printf("%c",s[i]); flag=1;}
		else if(flag==1) {printf("\n");flag=0;}

}
//****************************************************************
// ????1000012789_3.cpp                                      *
// ???wusy                                                    *
// ???12,8                                                    *
// ???????                                                *
//****************************************************************
int main()
{           
	int i;
	char a[31], *p = NULL;
	cin.getline(a,31);
	p = a;

	for (i = 0; *(p + i) != '\0'; i++)
	{
		if (*(p + i) <= '9' && *(p + i) >= '0' && *(p + i + 1) <= '9' && *(p + i + 1) >= '0')
			cout << *(p + i);
		if (*(p + i) <= '9' && *(p + i) >= '0' && ( *(p + i + 1) > '9' || *(p + i + 1) < '0' ))
			cout << *(p + i) << endl;
	}
	return 0;
}
int main()
{
 char string[30];
 gets(string);
 char *p=string;
 int clen,nolen=0;
 clen=strlen(string);
 for(int i=0;i<clen;i++)
 {
	 if(*(p+i)<'0'||*(p+i)>'9')
	 {
		 int ilen=0;
      if(*(p+i-1)<'0'||*(p+i-1)>'9')
	  { nolen++;ilen++;int jj=1;
	  while(1)
	  {
	   if(*(p+jj+i)<'0'||*(p+jj+i)>'9')
	   {nolen++;ilen++;jj++;}
	   else break;
	  }
	   for(int j=i;j<clen-nolen;j++)
	   {
	    *(p+j)=*(p+j+ilen);
	   }
	  }
	  else *(p+i)='\n';
	  }
 }
 string[clen-nolen]='\0';
 for(int j=0;j<clen;j++)
 {
  if((string[j]<'0'||string[j]>'9')&&(string[j]!='\n'))
  {
   string[j]='\0';break;
  }
 }
 cout<<string<<endl;
 return 0;
}
int main(){
	char str[31];
	int sum=0;
	cin.getline (str,31);
	for(int i=0;;i++){
		sum++;
		if(*(str+i)==0)break;
	}
		for(int i=0;i<sum;i++){
		if(*(str+i)>='0'&&*(str+i)<='9')cout<<*(str+i);
		else if(i!=0&&*(str+i-1)>='0'&&*(str+i-1)<='9')cout<<endl;
	}
	return 0;
}
int main()
{ 
    char str[300];
    cin.get(str,300);
    char *p=str;
    int l;
    l=strlen(str);
    int i;
    int q=0;
    for(i=0;i<l;i++,p++)
    {
       if((*p>=48)&&(*p<=57))
        {
           if((*(p+1)>=48)&&(*(p+1)<=57))
               cout<<*p;
            if((*(p+1)<48)||(*(p+1)>57))
               cout<<*p<<endl;                
        }                                             
    }
    
    
      
    return 0;                 
    
}
int ch(char a)
{
	if (a>='0'&&a<='9') return 1;
	return 0;
}
void main()
{
	char s[100];
	gets(s);
	int j,i,k=0,m=0;
	for (i=0;i<strlen(s);i++)
	{
	 if (i>0&&ch(s[i])&&!ch(s[i-1]))
		 k=i;
	 if (i>0&&!ch(s[i])&&ch(s[i-1]))
		 {
			 m=1;
			 for (j=k;j<=i-1;j++)
				 printf("%c",s[j]);
			 printf("\n");
		 }
	 if (ch(s[i])&&i==strlen(s)-1)
				  {
					  m=1;
			          for (j=k;j<=i;j++)
				        printf("%c",s[j]);
			          printf("\n");
			 }
	}
}
/*
 * tiqushuzi.cpp
 *???????
 *  Created on: 2012-12-24
 *      Author: ??
 */

int main(){
	char str[50],*p=str;//?????????
	int i=0;
	gets(p);//??
	for(i=0;*(p+i)!='\0';i++){
		if(*(p+i)<48||*(p+i)>57)
			continue;//????
		if(*(p+i+1)<48||*(p+i+1)>57)
			cout<<*(p+i)<<endl;//?????????
		else cout<<*(p+i);//????
	}
	return 0;
}
void main()
{
	char *p,*p_1,*p2;
	p=(char*)malloc(1000*sizeof(char));
	p_1=p;
    gets(p);
	for(p=p_1;*p!='\0';p++)
		if(*p>='0'&&*p<='9')
			printf("%c",*p);
		else
		{
			for(p2=p;*p2!='\0';p2++)
				if(*p2>='0'&&*p2<='9')
				{
					printf("\n");
					break;
				}
		}
}
main()
{
  int i;
  char a[30];
  gets(a);
  for(i=0;i<30;i++)
  {
    if(a[i]>=48&&a[i]<=57)
      printf("%c",a[i]);
    else
    {
      if(a[i-1]>=48&&a[i-1]<=57)
      printf("\n");
    }
  }
}
int main() {
	char a[31];
	char *p=a;
	int i=0;
	cin.getline(a,31);
	for(i=0;i<strlen(a);i+=1){
		if(*(p+i)>47&&*(p+i)<58)
			cout<<*(p+i);
		else if((*(p+i)<=47||*(p+i)>=58)&&(*(p+i+1)>47&&*(p+i+1)<58))
			    cout<<endl;
	}
	return 0;
}
/*
 * md.cpp
 *
 *  Created on: 2010-12-31
 *      Author: 10040
 */



int main(){
	char str[40];
	cin.getline(str,40);
	//cout << str <<endl;
	int tens[9]={1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000};
	int num=0, k=0;
	int len = strlen(str);
	for(int i=0; i<len; i++){
		if(str[i]>='0' && str[i]<='9'){
			k++;
			continue;
		}
		else if(k==0) continue;
		else{
			for(int j=0; j<k; j++){
				//cout << str[i-j] << endl;
				num += (str[i-j-1]-'0')*tens[j];
			}
			k=0;
			cout << num << endl;
			num = 0;
		}
	}
	if(k!=0){
		for(int j=0; j<k; j++){
			num += (str[len-j-1]-'0')*tens[j];
		}
		k=0;
		cout << num << endl;
	}


	return 0;
}
/*
 *???: get_numbers.cpp
 *??: ???
 *????: 2012-12-09
 *??: ?????????
 */



int main()
{
	char str[MAXL+10]; //???
	int nNumbers=0; //????

	cin.getline(str,sizeof(str));
	for (char *p=str;;p++){
		if (*p>='0' && *p<='9'){ //???????????
			cout << *p;
			nNumbers++;
		}
		else if (nNumbers && *(p-1)>='0' && *(p-1)<='9') //???????????
			cout << endl;
		if (!*p) break; //??\0,????
	}
	return 0;
}