semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,i,j,k;
	char a[30];
	char *s;
	gets(a);
    s=a;
	n=strlen(a);
      for(i=0;i<n;i++)
	  {if(*(s+i)>='0'&&*(s+i)<='9')
		  {
			  j=0;
			  printf("%c",*(s+i));
		  }
		  else
			  if(j==0)
			  {  printf("\n");
	  continue;}
			  else
				  continue;
}
 return 0;
}
/**
 * ??????
 * ??: 1000012844
 * ??? ????
 **/



int main()
{
	char str[ 32 ] = { 'q' }, *ptr = NULL;			// ptr???????????????
	cin.getline( str + 1, 31 );

	for ( ptr = 1 + str; ptr < 1 + str + strlen( str ); ptr++ )
	{
		if ( *ptr >= '0' && *ptr <= '9' && ( *( ptr - 1 ) > '9' || *( ptr - 1 ) < '0' ) )
		{
			cout << atoi( ptr ) << endl;
		}
	}

	return 0;
}
char x[1000];
int main()
{
    int i,len;
    gets(x+1);
    x[0]='0';
    len=strlen(x+1);
    for(i=1;i<=len;i++)
    {
                      if(isn(x[i])&&!isn(x[i-1]))
                      printf("\n");
                      if(isn(x[i]))
                      printf("%c",x[i]);
    }
   //a getch();
    return 0;
}
/*           ????
??????      2010.12.12        */
int main()
{
	int num,flag=0;
	char a[50];
	char *p;
	cin.getline(a,sizeof(a));
	a[strlen(a)]='a';
	for(p=a;p<a+strlen(a);p++)
		if(*p<='9'&&*p>='0')
		{
			if(flag)
				num=num*10+*p-'0';
			else
				num=*p-'0';
			flag=1;
		}
		else
		{
			if(flag==1)
				cout<<num<<endl;
			flag=0;
		}
	return 0;
}
/*
 * tiqushuzi.cpp
 *
 *  Created on: 2012-12-14
 *      Author: asus
 */

int main()
{
    char s[40];
    cin.getline(s,40);
    int t = 0;
    char temp[40];//?temp?????
    for(int i = 0; i < strlen(s); i++)
    {
        if(*(s + i) >= '0'&&*(s + i) <= '9')
        {
            t++;//?t???????
            *(temp + t) = *(s + i);
            if(i == strlen(s) - 1)//????????????
            for(int i = 1; i <= t; i++)
            cout << *(temp + i);
            continue;
        }
        else if(t != 0)
        {
            for(int i = 1; i <= t; i++)
            cout << *(temp + i);
            cout << endl;
            t = 0;
        }
    }
    return 0;

}
void main()
{
char *a;
a=(char*)malloc(10000*sizeof(char));
int i;
gets(a);
for(i=0;*(a+i)!='\0';i++)
{
if(*(a+i)>=48&&*(a+i)<=57)
printf("%c",*(a+i));
else printf("\n");
}
}
int main()
{
	char sen[31] , *p = NULL ;					//sen?????????*p???
	int flag = 0 , len;								//flag????len???????
	cin.getline(sen , 31) ;
	len = strlen(sen) ;							//????????
	for (p = sen ; p < sen + len ; p++)			//???????????
	{
		if(*p >= '0' && *p <= '9')				//????????????flag??1
		{
			cout << *p ;
			flag = 1 ;
		}
		if((*p < '0' || *p > '9') && flag == 1)	//??????????????????????????flag??0
		{
			cout << endl ;
			flag = 0 ;
		}
	}
	return 0 ;
}
/**
* @file 1000012907_3.cpp
* @author ???
* @date 2010?12?11
* @description
* ??????: ???? 
*/
int main() 
{
	char str[31];
	int len, i, flag;
	char *p = str;
	gets(str);
	len = strlen(str);
	for (p = str; p < str + len; p++)
	{
		if (*p - '0' >= 0 && *p - '0' <= 9)
		{
			cout << *p;
			flag = 0;
		}
		else if (flag == 0)
		{
			cout << endl;
			flag = 1;
		}
	}
	return 0;
}
int detc(char m)
{
	if(m>=48&&m<=57)return 1;
	else return 0;
}
int main()
{
	char c[30];
	int i,j,k;
	int m,n;
	cin.getline(c,31,'\n');
    n=strlen(c);
	for(i=0;i<=n-1;i++)
	{
		if((i==0&&detc(c[i])==1)||i!=0&&detc(c[i])&&!detc(c[i-1]))
		{
			for(j=0;detc(c[i+j])==1;j++)
			{cout<<c[i+j];}
			cout<<endl<<endl;
		}
	}
	return 0;
}
int main()
{
	char a[100],*p,*q;
	int i;
	p=a;
	q=a;
	for(i=1;i<=30;i++,p++)
	{
		scanf("%c",p);
	if(*p=='\0')
		break;
	}
	for(i=1;i<=30;i++,q++)
	{
		if(*q>=48&&*q<=57)
			printf("%c",*q);
		else if(*(q-1)>=48&&*(q-1)<=57)
			printf("\n");
	}
	return 0;
}
/** c version **/


int isDigit(char ch) {
    if (ch == '\0') return -1;
    if ('0' <= ch && ch <= '9') return 1;
    return 0;
}

int main() {
    char *p = (char *) malloc(40 * sizeof(char));
    gets(p);
    do {
        p--;
        while (isDigit(*(++p)) == 0) {} // ignore non-digit chars
        p--;
        while (isDigit(*(++p)) == 1)
            printf("%c", *p);
        printf("\n");
    } while (*p != '\0');
    return 0;
}
int main(){
  int tmp=-1;
  char ch;
  while (scanf("%c",&ch)!=EOF){
    if ((ch<48)||(ch>57)){
      if (tmp>=0)
        printf("%d\n",tmp);
      tmp=-1;
    }else{
       if (tmp<0)
         tmp=ch-48;
       else
         tmp=tmp*10+ch-48;
    }
  }
  if (tmp>=0)
    printf("%d\n",tmp);
}
int main()
{
	char s1[300],s2[300];
	char *p1=s1,*p2=s2;
	int k=0;
	
	gets(s1);
	for (;*p1!='\0';p1++)
	{
		if (*p1>='0' && *p1<='9')
		{
			k++;
			*p2=*p1;
			p2++;
		}
		else if (k)
		{
			k=0;
			*p2='\0';
			p2=s2;
			cout<<s2<<endl;
		}
	}
	if (k)
	{
		*p2='\0';
		cout<<s2<<endl;
	}
	
	return 0;
}
void main()
{
	char *p;
	char a[30];
	p=(char*)malloc(30*sizeof(char));
	gets(a);
	p=a;
	for(p=a;*p!='\0';p++)
		if(*p>=48&&*p<=57)
		{
			printf("%c",*p);
			if(*(p+1)<48||*(p+1)>57)
			{
				printf("\n");
			}
		}
}
int main()
{char s[32];
char *t=s;
int b;
gets(s);
for(;(*t)!='\0';t++)
{if((b=*t)>47&&(b=*t)<58)
{printf("%c",*t);
continue;}
else if((b=*(t-1))>47&&(b=*(t-1))<58)
{printf("\n");
continue;}
}
return 0;
}
/*
 * 12-4.cpp
 *
 *  Created on: 2011-12-25
 *      Author: wuch
 */

int main(){
	char s[30];
	int i,j;
	gets(s);
	i=0;
	j=1;
	for (i=0;i<30;i++) if ('0'<=s[i]&&'9'>=s[i]) break;
	while (*(s+i)){
		if ('0'<=*(s+i)&&'9'>=*(s+i)){
			if (j==1) cout<<*(s+i);
			else {
				
				 cout<<endl<<*(s+i);
				
			}
			j=1;
		}
		else j=0;
		i++;
	}
	return 0;
}
int main()
{
	char fuck[30];
	int i;
	gets(fuck);
	for(i=0;i<30;i++){
		if(fuck[i]=='1'||fuck[i]=='2'||fuck[i]=='3'||fuck[i]=='4'||fuck[i]=='5'||fuck[i]=='6'||fuck[i]=='7'||fuck[i]=='8'||fuck[i]=='9'||fuck[i]=='0'){
			printf("%c",fuck[i]);
		}else{
			if(i==0){
				continue;
			}
			if(fuck[i-1]=='1'||fuck[i-1]=='2'||fuck[i-1]=='3'||fuck[i-1]=='4'||fuck[i-1]=='5'||fuck[i-1]=='6'||fuck[i-1]=='7'||fuck[i-1]=='8'||fuck[i-1]=='9'||fuck[i-1]=='0'){
				printf("\n");
			}
		}
	}
	return 0;
}
char a[33];
int main()
{
char *p;
p=&a[0];
int flag=0;
cin.getline(a,32);
while(1)
{
if(*p<='9'&&*p>='0')
{
flag=0;
cout<<*p;
p++;
}
else if(flag==0)
{
cout<<endl;
flag=1;
p++;
}
else p++;
}
}
/*
2010 12 24 ??
?? 
?????????????30????????????????????????????????????
 
???? 
?????,?????30
 
???? 
???????????,??????. (??????) 

?? 1000012760
*/


int main(){
	char a[31], *p= NULL;
	cin.getline(a, 31, '\n');
	p= a;

	while(*p!= '\0'){
		if(*p<= '9' && *p>= '0')
			cout<<*p;
		if((!(*p<= '9' && *p>= '0')) && (*(p- 1)<= '9' && *(p- 1)>= '0'))
			cout<<endl;
		p++;
	}
	return 0;
}
/*
 * test4_1.cpp
 *?? - ????
 *  Created on: 2010-12-31
 *      Author: 10035
 */

int main()
{
	char c[50];  //????
	int n,i;
	cin.getline(c,50);
	n=strlen(c);
	i=0;
	while (i<n)
	{
		if ((c[i]<'0')||(c[i]>'9')) {i++; continue;}         //????,????
		while ((c[i]>='0')&&(c[i]<='9')&&(i<n)) {cout<<c[i]; i++;}  //???,??
		cout<<endl;
	}
	return 0;
}
int main(){
	int l,i,t=0;
	char a[40];
	cin.getline(a,31);
	l=strlen(a);
	while(1){
	for(i=t;i<l;i++){
	if(a[i]>='0'&&a[i]<='9')
	cout<<a[i];
	else break;
	}
	if(i>l-1) break;
	cout<<endl;
	while(i<l){
		if(a[i]<='9'&&a[i]>='0')
			break;

			i++;
	}
	t=i;

	if(i>l-1) break;
	}
}
void main()
{
	char str[32];
	gets(str);
	char *p=str;
	int i;
	for(i=0;*(p+i)!='\0';i++)
	{
	    if(*(p+i)>='0'&&*(p+i)<='9')putchar(*(p+i));
	    else if(*(p+i-1)>='0'&&*(p+i-1)<='9')putchar('\n');
	}
}
int main ()
{
	int i,m;
	char c[30];
	for (i=0;;i++)
	{
		scanf("%c",&c[i]);
		if (c[i]=='\n')
			break;
	}
	if('0'<=c[0]&&c[0]<'9')
		printf("%c",c[0]);
	for (m=1;m<i;m++)
	{
		if(c[m]<'0'||c[m]>'9')
		{
			if('0'<=c[m-1]&&c[m-1]<='9')
			printf("\n");
		}
		else if('0'<=c[m]<='9')
			printf("%c",c[m]);
	}
	return 0;
}
int main()
{
    char zfc[30];
    int i,len;
    gets(zfc);
    len=strlen(zfc);
    for(i=0;i<len;i++){
		if(zfc[i]=='0'||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'){
            if(zfc[i+1]=='0'||zfc[i+1]=='1'||zfc[i+1]=='2'||zfc[i+1]=='3'||zfc[i+1]=='4'||zfc[i+1]=='5'||zfc[i+1]=='6'||zfc[i+1]=='7'||zfc[i+1]=='8'||zfc[i+1]=='9'){
				printf("%c",zfc[i]);
            }else{
                printf("%c\n",zfc[i]);
            }
        }
    }
    return 0;
}
int main()
{   char a[100],*p1,*p2,str[100];
    gets(a);
    p1=a;
    p2=str;
    int num=0;
    while(*p1!='\0'){
        if ((*p1)>='0'&&(*p1)<='9') 
        {*p2=*p1;
        p1++;p2++;
        num=0;
        }
        if (((*p1)<'0'||(*p1)>'9')&&num==0) {*p2='\0';
                                             p2=str;
                                             cout<<p2<<endl;
                                             p1++;
                                             num++;}
        if (((*p1)<'0'||(*p1)>'9')&&num>0)    p1++;                                 
        
              }
              
      return 0;
}
//
//  main.cpp
//  Homework
//
//  Created by ??? on 13-12-4.
//  Copyright (c) 2013? ???. All rights reserved.
//


int main()
{
    char a[31];
    cin.getline(a,31);
    char *p=a;
    for(int i=0;i<31;i++)
    {
        if(*(p+i)>='0'&&*(p+i)<='9')
            cout<<*(p+i);
        else
            if(*(p+i+1)>='0'&&*(p+i+1)<='9')
               cout<<endl;
    }
    return 0;
}
int main()
{
	char s[30];
	int i,len,k;
	gets(s);
	len=strlen(s);//?????????????????
	for(i=0;i<len;i++)
	{
		if(s[i]=='0'||s[i]=='1'||s[i]=='2'||s[i]=='3'||s[i]=='4'||s[i]=='5'||s[i]=='6'||s[i]=='7'||s[i]=='8'||s[i]=='9')
		{
			printf("%c",s[i]);
			k=0;
		}//?????????????k???0?
		else if(k==0)
		{
			printf("\n");
			k++;
		}//??????????K=0?????k?+1????????????????
	}
	return 0;
}
//?????????????????passed???????????????????
int main()
{
    char a[30];
    gets(a);
    char *p=a;
    char *q,*k;
    for(p=a;*p!='\0';p++)
    {
        if(*p>='0'&&*p<='9')
         {
           for(q=p;*q!='\0';q++)
         {
            if(*q<'0'||*q>'9')
            {
               cout<<endl;
               break;
            }
            cout<<*q;
            k=q;
         }
         p=k;
         }
    }
   return 0;
}
int main()
{
	char a[31],*q;
	int i,j,k,len;
	cin.getline(a,31);
	len=strlen(a);        //??????????
	q=a;k=0;
	for(j=0;j<len;j++)
	{
       if((*q>='0')&&(*q<='9'))   //??????????  
	   {
			cout<<*q;
            k=0;
        }
	   else if(k==0)      //???????????????????????
		{
			cout<<endl;
			k=1;
    	}
			q++;
	}
     
	return 0;
}
int main()
{
//???????????????????????????????
    char c[31];
    int i,j,sum;
    gets(c);
//??????????????c[0]???+??????????????
    for (i=30;i>=1;i--){
        c[i]=c[i-1];
        }
    c[0]='+';
//??????????????????
    sum=0;
    for (i=1;i<31;i++){
           if ((c[i-1]!='-')&&(c[i]>='0')&&(c[i]<='9')){
               sum=sum+1;
               for (j=i;(c[j]>='0')&&(c[j]<='9');j++){
                   printf("%c",c[j]);
                   }
               printf("\n");
               i=j;
               }
           }
     return 0;
}
int main()
{
	char s[31];
	int i;

	gets(s);

	for(i=0;i<30;i++){
		if((s[i]=='1'||s[i]=='2'||s[i]=='3'||s[i]=='4'||s[i]=='5'||s[i]=='6'||s[i]=='7'||s[i]=='8'||s[i]=='9'||s[i]=='0')&&(s[i+1]=='1'||s[i+1]=='2'||s[i+1]=='3'||s[i+1]=='4'||s[i+1]=='5'||s[i+1]=='6'||s[i+1]=='7'||s[i+1]=='8'||s[i+1]=='9'||s[i+1]=='0')){
			printf("%c",s[i]);
		}
		if((s[i]=='1'||s[i]=='2'||s[i]=='3'||s[i]=='4'||s[i]=='5'||s[i]=='6'||s[i]=='7'||s[i]=='8'||s[i]=='9'||s[i]=='0')&&s[i+1]!='1'&&s[i+1]!='2'&&s[i+1]!='3'&&s[i+1]!='4'&&s[i+1]!='5'&&s[i+1]!='6'&&s[i+1]!='7'&&s[i+1]!='8'&&s[i+1]!='9'&&s[i+1]!='0'){
			printf("%c\n",s[i]);
		}
	}
	
	return 0;
}
//********************************************
//?????????
//??????
//?????2010.12.10
//??????????????
//********************************************
int main ()
{
	char a[31], *p;//?????????
	cin.getline (a,31);//????????
	for (p = a; *p != '\0',p < a + 31; p++)
	{
		if (*p <= '9' && *p >= '0') 
			cout << *p;//??????????
		else if ( *(p-1) <= '9' && *(p-1) >='0')
			cout << endl;//????????????
	}
	return 0;
}
void main()
{
    
    int n,m=0;
	char *s,*ps;
    s=(char*)malloc(1000*sizeof(char));
    gets(s);
	n=strlen(s); 
	
	for(ps=s;*ps!='\0';ps++)
	{	
		if(*ps>='0' && *ps<='9')
			printf("%c",*ps);
		else
		{
			if(*(ps+1)<58 && *(ps+1)>47)
				printf("\n");
		}

	}
}
/*
 * GetNumbers.cpp
 *
 *  Created on: 2012-12-12
 *  Author: ??
 *  ???????
 */


int main()
{
	char a[40] ;
	int len = 0 ;
	cin.getline( a , sizeof(a) ) ;
	len = strlen(a) ;
	for( int i = 0 ; i < len ; i++ )
	{
		if( i == len - 1 ){                            //????
			if(*(a+i) >= '0' && *(a+i) <= '9')
			    cout << *(a+i) << endl ;
		}
		else{
			if( *(a+i) >= '0' && *(a+i) <= '9' )     //?????
		    {
		        if( *(a+i+1) >= '0' && *(a+i+1) <= '9' )    //????????
		        cout << *(a+i) ;
			    else  cout << *(a+i) << endl ;               //????????
		    }
		}
	}
	return 0 ;
}
int main(void)
{
    char fib[SIZE];
    int i=1;
    int t=1;
    int loser[SIZE];
    char *ptr;
    loser[0]=-1;
    
    gets(fib);
    
    for(i=0;i<strlen(fib);)
                          {
                         if((fib[i]>='0')&&(fib[i]<='9'))  
                         i++;
    
                         else
                          loser[t++]=i++;                                                                                                                                                                                              
                         }
    loser[t]=strlen(fib);                     
    ptr=&fib[0];
    for(i=0;i<t;i++)
     {                    
                         for(;loser[i]<loser[i+1]-1;loser[i]++)
                         {                                                                                                                                                                                              
                         printf("%c",*(ptr+loser[i]+1));
                         }
      if((*(ptr+loser[i])>='0')&&(*(ptr+loser[i])<='9')) 
      printf("\n");                   
                      
      
      }                
    
 
    return 0;
}
int main()
{
	char str[31];
	cin.getline(str,31);
	char *p=str;//????str???p
	while(*p!='\0')
	{
		if(*p>=48 && *p<=57)//????????
		{
			cout<<*p;
			p++;
		}
		else//?????????
		{
			cout<<endl;
			do
			{
				p++;
			}
			while((*p<48 || *p>57) && (*p!='\0'));//???????????????
		}
	}
	return 0;
}
int main()
{
	char *p,s;
	int n,i,j=0,m=0,*q;
	p=(char*)malloc(40*sizeof(char));
	q=(int*)malloc(40*sizeof(int));
	gets(p);
	n=strlen(p);
	for (i=0;i<n;i++)
	{
		if (*(p+i)>47&&*(p+i)<58)
		{
			*(q+j)=*(p+i)-48;
		//	printf("%d\n",*(q+j));
		
			j++;
		}
		else{ *(q+j)=-1;
		j++;
		}

	}
	for (i=0;i<j;i++)
	{
		m=m+*(q+i);
		if(*(q+i)!=-1)

			printf("%d",*(q+i));
		else 
			if (*(q+i+1)!=-1&&(m+i+1!=0))
			{
				printf("\n");
			}
		 
	

	}

}
int main()
{
 char *p,*head,c;
 p=(char *)malloc(sizeof(char)*30);
 head=p;
 scanf("%c",p);
 while(*p!='\n')
 {
 	p++,*p=getchar();
 }
 *p='\0';
 p=head;
 for(;*p!='\0';p++)
 {if(*p<='9'&&*p>='0')  printf("%c",*p);
  else if(*(p+1)<58&&*(p+1)>47)   putchar('\n');}
}
int main()
{
	int i;
	int l;
	int p=0,q=0;
	char a[40];
    char b[40][40];
	gets(a);
	l=strlen(a);
	*(a+l)='a';  //????????
	for(i=0;i<l;i++)
	{
		if((*(a+i)>='0')&&(*(a+i)<='9'))
		{
			*(*(b+p)+q)=*(a+i);
			q++;
			if((*(a+i+1)<'0')||(*(a+i+1)>'9'))
			{
				*(*(b+p)+q)='\0';
				p++;
				q=0;
			}
		}
	}
	for(i=0;i<p;i++)
		puts(*(b+i));
    return 0;
}
int main()
{ char a[30],*p;
  int i,t,n;
  gets(a);
  n=strlen(a);
  p=&a[0];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;}
     }

}
int main ()
{
	char s[35];
	gets(s);
	char * ps=s;
	int i=0, num=0;
	for(; *ps; ps++) {
		if (*ps>='0'&&*ps<='9') {
			num+=*ps-'0';
			num*=10;
			i=1;
		}
		else if (i==1) {
			printf("%d\n", num/10);
			num=0;
			i=0;
		}
	}
	if (i==1) printf("%d\n", num/10);
	return 0;
}
main()
{
    int a,b,c,n,m;
    char x[35];
    gets(x);
    n=strlen(x);
    for(a=0;a<=n-1;a++)
    {
        if((x[a]=='0')&&((x[a+1]>'9')||(x[a+1]<'1')))
        printf("0\n");
        else;
        if((x[a]<='9')&&(x[a]>='1'))
        {
            m=0;
            if(a==0)
            m=1;
            else if(x[a-1]!='-')
            m=1;
            else;
            if(m=1)
            {
                for(b=a+1;b<=n-1;b++)
                {
                    if((x[b]>'9')||(x[b]<'0'))
                    break;
                    else;
                }
                for(c=a;c<=b-1;c++)
                printf("%c",x[c]);
                printf("\n");
                a=b-1;
            }
            else;
        }
        else;
    }
}
int main()
{
    int n, i;
    char num[30];
    gets(num);

    n=strlen(num);
    for(i=0;i<n;i++)
    {
        if(num[i]!=96&&num[i]!=109)
        {
            while(num[i]>=48&&num[i]<=57)
            {
                putchar(num[i]);
                i++;
                continue;
            }
        }
        printf("\n");
    }

    return 0;
}
/*
 *function: ????
 *created on: 2012-12-17
 *author: ???
 */
int main()
{
	char a[30];
	int len,i;
	gets(a);         // ????????a???
	len=strlen(a);     
	if(*a>='0'&&*a<='9')
		cout << *a;    // ?????????????
	for(i=1;i<len;i++)
	{
		if(*(a+i)>='0'&&*(a+i)<='9')
			cout << *(a+i);   // ?????????
		else if((*(a+i)<'0'||*(a+i)>'9')&&(*(a+i-1)>='0'&&*(a+i-1)<='9'))
			cout << endl;  // ????????????????????
		else
			continue;  // ??????
	}
	return 0;
}
int main(){
	char a[31];
	cin.getline(a,31);
	int i,j,k;
	for(i=0;i<strlen(a);i++){
		if(a[i]>='0'&&a[i]<='9'){
			for(j=i+1;j<strlen(a);j++){
				if(!(a[j]>='0'&&a[j]<='9'))break;
			}
			for(k=i;k<j-1;k++)
				cout<<a[k];
			cout<<a[j-1]<<endl;
			i=j;
		}
	}
	return 0;
}
/*
 * tiqushuzi.cpp
 *
 *  Created on: 2012-12-13
 *      Author: alias
 */
int main(){
	char str[31];
	cin.getline(str,sizeof(str));
	int len = strlen(str);
	for (int i = 0;i < len;i++){
		if (*(str+i) >= '0'&&*(str+i) <= '9')
			cout << *(str+i);
		else{
			if (*(str+i+1) >= '0'&&*(str+i+1) <= '9')
				cout << endl;
			}
	}
	return 0;
}
int main()
{
	char a[30]=" ";
	gets(a);
	int g=1;
	char *p=a;
	for(int i=0;i<30;i++)
	{
		if(*(p+i)>='0'&&*(p+i)<='9')
		{
			cout<<*(p+i);
			g=1;
		}
		if((*(p+i)<'0'||*(p+i)>'9')&&g==1)
		{
			cout<<endl;
			g=0;
		}
	}
	return 0;
}
/*
 * tiqushuzi.cpp
 *
 *  Created on: 2012-12-13
 *      Author: Lenovo
 */
int main()
{
	char array[33];
	char *point = NULL;
	int sum=0;
	cin.getline(array,33);
	point = array;
	for(;point<strlen(array)+array;point++)
	{
		if((*point<48||*point>57)&&sum==0)
		{
			cout<<endl;
			sum++;
		}
		else if((*point<48||*point>57)&&sum>0)
		{}
		else
		{
			cout<<*point;
			sum=0;
		}
	}
	return 0;
}
int main()
{
	char num[40] , temp[40][40];
	int i , j , L;
	int S = 0 , Order = 0;
	cin.getline(num,40) ;
	L = strlen(num) ;
	for ( i = 0 ; i < L ; i ++ ) {
		if ( ( num[i] > '9' ) || ( num[i] < '0' ) ) {
			Order ++ ;
			for ( j = S ; j < i ; j++){
				temp[Order][j-S] = num[j] ;
			}
			temp[Order][j-S] = '\0' ;
			for ( j = i+1 ; j <= L ; j ++ ) {
				if ( ( num[j] <= '9' ) && ( num[j] >= '0' ) )  {
					S = j ;
					i = j-1 ;
					break ;
				}
				else if(num[j]=='\0')
					i=L-1;
			}
		}
	}
	if((num[L-1]<='9')&&(num[L-1]>='0')){
		Order ++ ;
		for(i=S ; i<L ; i++)
			temp[Order][i-S]=num[i];
		temp[Order][i-S]='\0';
	}
	for ( i = 1 ; i <= Order ; i ++ ) {
		cout << temp[i] ;
		if ( i != Order )
			cout << endl ;
	}
	return 0 ;
}
char str[31];
void number(int position)
{
    int i;
    if (!*(str+position)) return;
    else if(*(str+position)<='9'&&*(str+position)>='0'&&*(str+position-1)!='-')
    {
        for (i=position;*(str+i)<='9'&&*(str+i)>='0';i++)
            cout<<*(str+i);
        cout<<endl;
        number(i);
    }    
    else if (*(str+position)<='9'&&*(str+position)>='0'&&*(str+position-1)=='-')
    {
        for (i=position;*(str+i)<='9'&&*(str+i)>='0';i++);
        number(i);
    }
    else   number(position+1);
}
int main()
{
    int i;
    gets(str);
    number(0);
}
int main()
{
	char c[32];
	gets(c);
	int state = 0;
	for(int i = 0;i < strlen(c);i++)
	{
		if( * (c + i) >= '0' && *(c + i) <= '9')
		{
			if(state == 1)
			{
				cout<<endl;
				state = 0;
			}
			cout<<*(c+i);
		}
		else
		{
			if(state == 0)
			{
				state = 1;
			}
		}
	}
}
int main(){
	char m[31];
	char *pointer;
	int i,len,flag=0;
	cin.getline(m,31);
	len=strlen(m);
	pointer=&m[0];
	for(i=0;i<len;i++){
		pointer=&m[i];
		if(*pointer>=48&&*pointer<=57){
			cout<<*pointer;
			flag=1;
		}
		else{
			if(flag==1)
				cout<<endl;
			flag=0;
		}
	}
	return 0;
}
//********************************************************
//*  ???1000012846_3.cpp  *****************************
//*  ??:??  ******************************************
//*  ?????2010?12?  *******************************
//*  ?????????  *********************************
//********************************************************
int main()
{
	char a[31] ;
	cin.getline ( a , 31 ) ;
	int i = 0 ;                  //i??????
	while ( a[i] != '\0' )
	{
		if ( a[i] >= '0' && a[i] <= '9' )
		{
			char *p = &a[i] ;             //???????????
			while ( a[i] >= '0' && a[i] <= '9' )
				i++ ;
			a[i] = '\0' ;             //????????
			cout << p<< endl ;
		}
		i++ ;
	}
	return 0;
}
int main()
{int i,j;
char a[500];
gets(a);
for(i=0;i<strlen(a);i++)
if(a[i]>='0'&&a[i]<='9')
cout<<a[i];
else
{if(!(a[i]>='0'&&a[i]<='9')&&a[i+1]>='0'&&a[i+1]<='9')
cout<<endl;
}
return 0;
}
int main()
{
	char a[30],d='\n';
	int i,b,k=0,f=1;
	char *c[30];
	gets(a);
	b=strlen(a);
	for(i=0;i<b;i++)
	{
		if(a[i]>47&&a[i]<58)
		{c[k]=&a[i];k++;f=0;}
		else 
		{
		if(f==0)
		{c[k]=&d;k++;}
			f++;
		}

	}
	for(i=0;i<k;i++)
	printf("%c",*c[i]);

}
int main()
{
	int k,i;
	char*p;
	p=(char*)malloc(30*sizeof(char));
	gets(p);
	for(k=0,i=0;*(p+i)!='\0';i++)
	{
		if((*(p+i)>='0')&&(*(p+i)<='9'))
		{
			printf("%c",*(p+i));
			k=1;
		}
		if((k=1)&&!((*(p+i)>='0')&&(*(p+i)<='9')))
		{
			printf("\n");
			k=0;
		}
	}
}
int main(){

	int i,s,e,n;
	char a[30];
	gets(a);
	n=strlen(a);
	for(s=0;s<n;s++){
		if((s==0&&a[s]<='9'&&a[s]>='0')||(a[s]<='9'&&a[s]>='0')&&(a[s-1]>'9'||a[s-1]<'0')){
		    e=s;
			while(e!=n){
				if(a[e+1]>'9'||a[e+1]<'0')
					break;
				e++;
			}
			for(i=s;i<=e;i++)
				printf("%c",a[i]);
			printf("\n");
		}
	}
	return 0;
}
int function(int n)
{

}
int main()
{
    char str[30];
    cin.getline(str,40,'\n');
    int i=0,n=strlen(str);
    for(i=0; i<n; i++)
    {
        if(str[i]>='0'&&str[i]<='9'&&str[i-1]!='-')
            cout<<str[i];
        else if(i==0||(str[i-1]<'0'||str[i-1]>'9'))
            continue;
        else
            cout<<endl;
    }
   return 0;
}
int main()
{
	char a[30],n=0;
	char *p;
	p=a;
	cin.getline(a,31,'\n');
	for(;*p!='\0';p++)
	{
		n++;
	}
	for(p=a;*p!='\0';p++)
	{
		if(*p-'0'>=0&&*p-'0'<=9)
		{
				cout<<*p;
				{
					if((p+1)<(a+n)&&(*(p+1)-'0'<0||*(p+1)-'0'>9))
						 cout<<endl;
				}
		}
	
	}
         return 0;
}
int p(int a)
{
    int sum=1;
    for(int i=0;i<a;i++)
    {
            sum=sum*10;
    }
    return sum;
}
int main()
{
    char str[31];
    cin.getline(str,31);
    int len=strlen(str),num[30],j=0,k=0;
    memset(num,0,sizeof(num));
    for(int i=len-1;i>=0;i--)
    {
            if((str[i]<='9')&&(str[i]>='0'))
            {
                   num[k]=num[k]+(str[i]-'0')*p(j);
                   j++;    
            }
            else if((str[i+1]<='9')&&(str[i+1]>='0'))
                 {
                                                     j=0;
                                                     k++;
                 }
                 else continue;
    }
    if((str[0]>'9')||(str[0]<'0'))  k--;
    for(int i=k;i>=0;i--)  cout<<num[i]<<endl;
    return 0;
}
int main()
{
	char a[10000];
	int i,j,k;
	gets(a);
	for(i=0;a[i];i++)
	{
		if((a[i]=='0'||a[i]=='1'||a[i]=='2'||a[i]=='3'||a[i]=='4'||a[i]=='5'||a[i]=='6'||a[i]=='7'||a[i]=='8'||a[i]=='9')&&(a[i+1]=='0'||a[i+1]=='1'||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'))
			printf("%c",a[i]);
		if((a[i]=='0'||a[i]=='1'||a[i]=='2'||a[i]=='3'||a[i]=='4'||a[i]=='5'||a[i]=='6'||a[i]=='7'||a[i]=='8'||a[i]=='9')&&(a[i+1]!='0'&&a[i+1]!='1'&&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'))
			printf("%c\n",a[i]);
	}
	return 0;
}