semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    char input[50];
    int output=0,i,k=0,l;
    gets(input);
    l=strlen(input);
    for(i=0;i<=l-1;i++){
                        if(input[i]>=48&&input[i]<=57){
                                                    output=10*output+(input[i]-48);
                                                    k++;
                                                     }
                        else{
                             if(k>0&&input[i-1]>=48&&input[i-1]<=57)
                             {printf("%d\n",output);
                             output=0;}
                             }
                        }
    if(output!=0){printf("%d", output);}
    return 0;
}
int main()
{
	char a[30];
	int i,symbol[30];
	gets(a);
	for(i=0;a[i]!=0;i++)
	{
		if((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]=='0'))
		{
			symbol[i]=1;
			printf("%c",a[i]);
		}
		else
		{
			symbol[i]=0;
			if(symbol[i-1]==1)printf("\n");
		}
	}
	return 0;
}
int main()
{
	char a[10000],t=0,j;
	int i;
	cin.getline(a,10000);
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]>47&&a[i]<58)
		{
			cout<<a[i];
		}
		else
		{
			t=0;
			for(j=i;j<strlen(a);j++)
			{
				if(a[j]<48||a[j]>57)
				{
					t=t+1;
				}
				else
				{
					i=i+t-1;
					cout<<'\n';
					break;
				}
			}
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	int i;
	char *s;
	s=(char *)malloc(sizeof(char)*30);
	gets(s);
	for(i=0;*(s+i)!='\0';i++)
	{
		if(*(s+i)>'0'-1&&*(s+i)<'9'+1)
		{
			if(*(s+i+1)>'0'-1&&*(s+i+1)<'9'+1)
			printf("%c",*(s+i));
			else printf("%c\n",*(s+i));
		}
	}
	return 0;
}
int main()
{
	char a[30],b[30];
	int i,n,z,x=1;
    gets(a);
	n=strlen(a);
	for(i=0;i<n;i++)
	{
		if((a[i]>47)&&(a[i]<58))b[i]=a[i];
		else b[i]='\n';
	}
	for(i=0;i<n;i++)
	{
		if(b[i]!='\n')
		{
			z=i;
			break;
		}
	}
	printf("%c",b[z]);
	for(i=z+1;i<n;i++)
	{
		if((b[i]!='\n')||(b[i-1]!='\n'))printf("%c",b[i]);
	}
}
int main(void) 
{ 
    int ch, num = 0, flag = 0, count = 0; 
     
    while(ch = getchar()) 
    { 
              if(!isdigit(ch) && flag) 
              { 
                      printf("%d\n", num); 
                      count++; 
                      num = flag = 0; 
              } 
              if(isdigit(ch)) 
              { 
                    num  = 10 * num + ch - '0'; 
                    flag = 1; 
                    continue; 
              } 
              if(ch == '\n')break; 
                  
    }             
    
    return 0;    
}
int main(){
	char p[31];
	cin.getline(p,31);
	int i;
	for (i=0;1;i++){
		if ((p[i]>='0')&&(p[i]<='9'))
			cout<<*(p+i);
		else if (p[i]=='\0')
			break;
		else
			cout<<endl;
	}
	return 0;
}
int main()
{
	char a[31] ;
	cin.getline(a , 31) ;
	int length = strlen(a) ;
	int flag = 0 ;
	char *p = a ;
	for(int i = 0 ; i<length ; i++ , p++)
	{
		if(!(((int)*p>='0')&&((int)*p<='9')))
		{
			 if(flag == 0)	
				cout<<endl ;
			flag = 1 ;
		}
		else
		{
			cout<<*p ;
			flag = 0 ;
		}
	}
	return 0 ;
}
int main()
{
    char a[35];  //????? 
    cin.getline(a,35);
    int len=strlen(a);
    char *p1=a;  //??????????? 
    char *p2=a;
    while(p1<a+len)
    {
        if(*p1>='0'&&*p2<='9')
        {
            while(*p2>='0'&&*p2<='9')   p2++;
            *p2=0;   // ??0 
            cout<<p1<<endl;
            p1=p2;  //???? 
        }
        else
        {
            p1++;  
            p2=p1;
        }
    }
    return 0; 
}
int main()
{
  int i;
  char c[n];
  gets(c);
  for(i=0;i<n;i++){
    if((c[i]=='0'||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+1]!='0'&&c[i+1]!='1'&&c[i+1]!='2'&&c[i+1]!='3'&&c[i+1]!='4'
		&&c[i+1]!='5'&&c[i+1]!='6'&&c[i+1]!='7'&&c[i+1]!='8'
		&&c[i+1]!='9')) printf("%c\n",c[i]);
	else if((c[i]=='0'||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+1]=='0'||c[i+1]=='1'||c[i+1]=='2'||c[i+1]=='3'||c[i+1]=='4'
		||c[i+1]=='5'||c[i+1]=='6'||c[i+1]=='7'||c[i+1]=='8'
		||c[i+1]=='9')) printf("%c",c[i]);
  }
  return 0;
}
/*
 * 001.cpp
 * name:????
 *  Created on: 2011-12-25
 *      Author: 11029
 */
int main(){
	char c;
	int flag=1;
	while ((c=getchar())!='\n')
	{
		if (c>='0'&&c<='9')
		{
			cout<<c;
			flag=0;
		}
		else
		{
			if (flag==0)
				cout<<endl;
			flag=1;
		}
	}
	return 0;
}
int main()
{
    char c[50];
    char *p;
    gets(c);
    for (p = c; p < c + strlen(c); p++) {
        if (*p >= '0' && *p <= '9') {
            printf("%c", *p);
            if (p < c + strlen(c) - 1 && *(p+1) >= '0' && *(p+1) <= '9' ) {
                continue;
            }
            printf("\n");
        }
    }
    return 0;
}
int shuzi(char a)
	{
		if(48<=a&&a<=57)
			return 0;
		else return 1;
}
int main()
{
	char a[100];
	gets(a);
	char *p=a;
	while(*p!='\0')
	{
		if(shuzi(*p)==0)
			cout<<*p;
		if(shuzi(*p)==1&&shuzi(*(p-1))==0)
			cout<<endl;
		p++;
	}
	return 0;
}
int main()
{ 
   char str[100],temp[100];                   //?????? 
   char *p=str,*q=temp;       //?????????????????a
   int i=0,j=0,flag;                            //??????N
   cin.getline(p,100);
   while(1)
   {
          
          if(*p<=57&&*p>=48)
          {*q=*p;q++;flag=1;}          
          else if(flag==1)
          { *q=0;
               q=temp;
               cout<<q<<endl;
               flag=0;
          }
          if(*p==0)
          break;          
        p++;
   }
     
 
    return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2011-12-25
 *      Author: Administrator
 */
char a[50];
void print(int x, int y)
{
	if(x>y) return;
	int i;
	for(i=x;i<=y;i++)
		cout<<a[i];
	cout<<endl;
}

int main()
{

	int i,k,l;
	gets(a);
	l=strlen(a);
	k=0;
	for(i=0;i<l;i++){
		if(a[i]<='9' && a[i]>='0') continue;
		print(k,i-1);
		k=i+1;
	}
	print(k,i-1);
	return 0;
}
main()
{
	int i,j;
	char a[30];
	gets(a); 
	i=0;
	while(i<strlen(a))
	{
		if(a[i]>='0'&&a[i]<='9')
		{
			for(j=i;a[j]>='0'&&a[j]<='9';j++)
			printf("%c",a[j]);
			printf("\n");
			i=j+1;
		}
		else i++;
	}
}
int main()
{
	int flag;                      /*????*/
	char a[40];                    /*?????*/
	char *p;                       
	gets(a);                       /*?????*/
	p=a;
	while(1)                       /*??????????*/
	{
		if(*p==NULL)                 
			break;
		if(*p>='0'&&*p<='9')       /*????*/
		{
			cout<<*p++;
			flag=1;
		}
		else if(flag==1)           /* ??????????*/
		{
			cout<<endl;
		    p++;
			flag=0;
		}
		else                       /*????????*/
			p++;
	}
	cout<<endl;
	return 0;
}
int main()
{
   char str[100],out[100][100];
   int len,k,i=0,j=0,m;
   cin.getline(str,31,'\n');
   len=strlen(str);
   for(k=0;k<len;k++)
   {
      if(str[k]>='0' && str[k]<='9')
	  {
	     out[i][j]=str[k];
		 j++;
	  }
	  else if(str[k-1]>='0' && str[k-1]<='9')
	  {
	     i++;
		 j=0;
	  }
	  else continue;
   }
   for(m=0;m<=i;m++)
   {
	  if(out[m]=="\0") break;
	  cout<<out[m];
	  cout<<endl;
   }
   return 0;
}
int main()
{
 char words[MAXNUM],temp[MAXNUM];
 gets(words);
 int len1,len2,ans;
 len1=strlen(words);
 len2=0;
 for(int i=0;i<len1;i++)
 {
  if(words[i]>=48&&words[i]<=57)
   temp[len2++]=words[i];
   else
   {
    if(len2>=1) 
    {
      temp[len2]='\0';
      cout<<(int)atof(temp)<<endl;
      len2=0;  
    }
    else
     continue;
   }
 }
 if(len2>=1&&(words[len1-1]>=48&&words[len1-1]<=57))
 {temp[len2]='\0';
 cout<<(int)atof(temp);}
 return 0;
}
int main()
{
	int n=0;
	char c[31]={0};
	char *p=c;
	cin.getline(c,31);
	for(p=c;p<c+strlen(c);p++)
	{
		if(*p=='0')
			cout<<0<<endl;
		else if(*p>'0'&&*p<='9')
		{
			cout<<atoi(p)<<endl;
			while(n==0)
				if(*(p+1)>='0'&&*(p+1)<='9')
					p++;
				else
					n=1;
		}
		n=0;
	}
	return 0;
}
main()
{
    char s[30];
    int i;
    gets(s);
    for(i=0;i<strlen(s);i++)
    {
        if(s[i]>47&&s[i]<58)
            printf("%c",s[i]);
        else if(s[i+1]>47&&s[i+1]<58)
            printf("\n");
    }
    getchar();
    getchar();
}
// ???????//
//??????//
//???1000011029//
//???2010?12?14?//


int main()
{
	char num[31];                                                 //?????//
	char*p;                                                       //????//
	char*m;
	int i = 0;                                                    //????//
	int mount = 0;                                                //????//

	cin.getline(num,31);                                          //?????//

	int len = strlen( num );                                      //???????//
	
	p = num;                                                      //?????//

	for( i = 0;i < len;i++ )
	{
		if( (*p) - '0' >= 0 && (*p) - '0' <= 9 )                  //??????????//
			cout << *p;
		else
			if( *(p - 1) - '0' >= 0 && *( p - 1 ) - '0' <= 9 )    //????????????????//
			{
				cout << endl;
				mount++;
			}
		p++;
		

	}

	return 0;
}
int main()
{
char *a;
int i,ok;
a=(char*)malloc(sizeof(char)*30);
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;
}
/*
 * ym.cpp
 *
 *  Created on: 2010-12-31
 *      Author: 10151
 */

int main() {
	char a[31];
	cin.getline(a, 31);
	int len = strlen(a);
	for (int i = 0; i < len; i++) {
		if ((a[i] > '9' || a[i] < '0')&&(a[i+1] <= '9' && a[i+1] >= '0')){
			cout << endl;
			continue;
		}
		if ((a[i] > '9' || a[i] < '0')&&(a[i+1] > '9' || a[i+1] < '0'))continue;
		cout << a[i];
	}
	return 0;
}
int main()
{
	int i,j=0;
	char sz[30];
	gets(sz);  /*????*/

	for(i=0;i<30;i++)
	{
		if((sz[i]=='0')||(sz[i]=='1')||(sz[i]=='2')||(sz[i]=='3')||(sz[i]=='4')||(sz[i]=='5')||(sz[i]=='6')||(sz[i]=='7')||(sz[i]=='8')||(sz[i]=='9'))
		{
			printf("%c",sz[i]);
			j=0; /*???????????????????*/
		}
		else
		{
			j++;
			if(j==1)
			{
				printf("\n");
			}  /*????????????????*/
		}
	}

	return 0;
}
int main()
{ 
   char str[100],temp[100];
//??????str????????temp????????? 
   char *p=str,*q=temp;                 //????????str?temp
   int flag;                            //??????flag?1????????
   cin.getline(p,100);                  //???????
   while(1)
   {
     if(*p<=57&&*p>=48)                //??????????
         {
          *q=*p;q++;flag=1;
         }                             //????q???????q??
     else if(flag==1)                  //??????temp??????
          { 
            flag=0;                           
            *q=0;                      //????????????
            q=temp;                    //??q??temp?????
            cout<<q<<endl;
          }                           //?????????
     if(*p==0)                        //??q?????????          
     break;          
     p++;                              //??p?????????
   }
  
   return 0;
}
/*
 * kaoshi____1225.cpp
 *???????
 *  Created on: 2011-12-25
 *      Author: ???
 */
int main ()
{
	char a[50];
	cin.getline(a,50);
	int i=0,j;
	while (i<strlen(a))
	{
		while (a[i]<'0'||a[i]>'9')
		{
			i++;
			if ((a[i]>='0'&&a[i]<='9')||i==strlen(a)-1)
			{
				cout<<endl;
				break;
			}
			
		}
		if (i==strlen(a)-1&&(a[i]<'0'||a[i]>'9'))
						break;

		cout<<a[i];
		i++;
	}
	return 0;

}
/*
 * XIV8.cpp
 *
 *  Created on: 2012-12-11
 *      Author:???
 *      ???????
 */
int main() {
	char *p, a[31];
	cin.getline(a, 31);
	for (p = a; p - a < 31; p++) {
		if (*p >= '0' && *p <= '9')
			cout << *p;//??????
		else if (*(p + 1) >= '0' && *(p + 1) <= '9')
			cout << endl;//??????????????????????
	}
}
int main()
{
	char a[31],i;
	gets(a);
	for(i=0;i<31;i++){
		if(a[i]>=48&&a[i]<=57){
			printf("%c",a[i]);
		}
    if(a[i+1]>=48&&a[i+1]<=57&&a[i]<48||a[i]>57&&a[i+1]>=48&&a[i+1]<=57){
			printf("\n");
		}
	}
	return 0;
}
int main()
{
    char a[30];
    gets(a);
    int k;
    for(int i=0;i<strlen(a);i++)
    {
        if(a[i]>='0'&&a[i]<='9')
         {
           for(int j=i;j<strlen(a);j++)
         {
            if(a[j]<'0'||a[j]>'9')
            {
               cout<<endl;
               break;
            }
            cout<<a[j];
            k=j;
         }
         i=k;
         }
    }
   return 0;
}
int main()
{
  char c[50];
  int end,i,l;
  gets(c);
  l=strlen(c);
  end=1;
  for(i=0;i<l;i++)
  {
    if((c[i]>='0')&&(c[i]<='9'))
	 {
	   printf("%c",c[i]);
	   end=0;
	  }
	if(((c[i]<'0')||(c[i]>'9'))&&(end==0))
	 {
	   printf("\n");
	   end=1;
	 }
  }
  return 0;
}
void main()
{
	char a[30],*p;
	int i,k;
	gets(a);
	k=strlen(a);
	p=a;
    for(p=a;p<a+k;p++)
	{
		if(*p>='0'&&*p<='9'&&*(p+1)>='0'&&*(p+1)<='9')
			printf("%c",*p);
		if(*p>='0'&&*p<='9'&&(*(p+1)<'0'||*(p+1)>'9'))
			printf("%c\n",*p);
	}
}
void main()
{
	
	char *str;
	str=(char*)malloc(30*sizeof(char));
	char *p;
	p=str;
	gets(str);
	//puts(str);
	for(p=str;p<str+strlen(str);p++)
	{
		if(48<=*p&&*p<=57)
		{
		
		printf("%c",*p);
		}
			if(  (48<=*(p-1)&&*(p-1)<=57)&&(!(48<=*p&&*p<=57)) )printf("\n");

	}
}
//???????
//??????
//???2010.12.10

int main()
{
	char a[31];
	int i = 0;
	char *p = 0;
	int f = 0;

	memset(a,0,sizeof(a));

	cin.getline(a, 31);

	p = a;                          //???p????
	for (i = 1; i <= 30; i++, p++)
	{
		//?????????????????????
		if (((*p < '0') || (*p > '9')) && (f == 1))
		{
			cout << endl;
			f = 0;
		}
		//?????????????????????
		if ((*p >= '0') && (*p <= '9') && (f == 1))
			cout << *p;
		if ((*p >= '0') && (*p <= '9') && (f == 0))
		{
			cout << *p;
			f = 1;
		}
		//???????
		if (*p == '\0')
			break;
	}

	return 0;
}
int sz(char a)
{
	int m=0;
	if(('0'<=a)&&(a<='9'))
		m=1;
	return m;
}
int main()
{
	int i,n,k=0;
	char *p,a[30];
	gets(a);
	p=a;
	n=strlen(a);
	for(i=0;i<n;i++,p++)
	{
		if(sz(*p)==1)
		{
			printf("%c",*p);
			k=1;
		}
		else
		{
			if(k==1)
			{
				printf("\n");
				k=0;
			}
		}
	}
	return 0;
}
main()
{
 char a[31]={0};
 gets(a);
 int i,n,j,k;
 for(i=0;a[i];i++)
 if(a[i]==' ') a[i]='#';
 n=strlen(a);
 for(i=0;i<n;i++)
 {
  if(!(a[i]-'0'>=0&&a[i]-'0'<=9))
  {a[i]='#';}
 }
 for(i=0;i<n;i++)
 {
  if(a[i]=='#') continue;
  if(a[i]-'0'>=0&&a[i]-'0'<=9) printf("%d",a[i]-'0');
  if(a[i]-'0'>=0&&a[i]-'0'<=9&&a[i+1]=='#') printf("\n");
 }
}
// 44.cpp : Defines the entry point for the console application.
//

 
int main() 
{
	char s[30];
	gets(s);
	int i;
	int len=strlen(s);
	for(i=0;i<len;i++){
		if(s[i]>='0'&&s[i]<='9'&&(s[i+1]>='0'&&s[i+1]<='9')){
			printf("%c",s[i]);
		}
		if(s[i]>='0'&&s[i]<='9'&&(s[i+1]<'0'||s[i+1]>'9')){
			printf("%c\n",s[i]);
		}
	}
	return 0;
}
int main()
{char *p,*q;
 int a,i;
q=p=malloc(100);
gets(q);
for(i=0;i<30;i++)
if(((*(p+i-1)>'9')||(*(p+i-1)<'0'))&&((*(p+i)<='9')&&(*(p+i)>='0')))
{a=atoi(p+i);printf("%d\n",a);}
return 0;}
void main()
{
	int i;
	char s[30];
	gets(s);
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>'0'-1&&s[i]<'9'+1)
		{
			if(s[i+1]>'0'-1&&s[i+1]<'9'+1)
			printf("%c",s[i]);
			else printf("%c\n",s[i]);
		}
	}
}
//????
int main()
{
	char a[32];
   cin.getline(a ,32);//??
  char *p=a;
 for(int i=1;i<=strlen(a);i++)
 {
   if(*p>='0'&&*p<='9')
	  { cout<<*p;
   p++;
   }//???????
   else
	 {  cout<<endl;
   p++;
   }
 }//????????
   
   return 0;

}
/*
 * ????pick-out-numbers.cpp
 * ??????
 * ????:2012-12-19
 * ???????
 */
int main(){                        //???
	char str[31],*p=str;       //?????str,??p
	cin.getline(str,31);       //?????str
	if(isdigit(*p))cout<<*p++; //??????????????*(p-1)???
	while(*p!=0)               //????????
	{
		if(isdigit(*p))cout<<*p;
		else if(isdigit(*p)!=isdigit(*(p-1)))cout<<'\r';
		p++;
	}
	return 0;                  //?????
}
int main ( )
{
	char str[31], *p = NULL;
	int i, n;
	cin.getline(str, 31);
	p = str;
	n = strlen(str);/*???????*/
	for(i = 0;i < n;i++)
	{
		if(*p - '0'>= 0 && *p - '0' <= 9 && *(p+1) - '0'>= 0 && *(p+1) - '0'<= 9)/*????????*/
		{
			cout << *p;
		}
		else if(*p - '0'>= 0 && *p - '0' <= 9 && (*(p+1) - '0'< 0 || *(p+1) - '0'> 9))/**p???????????*/
		{
			cout << *p <<endl;
		}
		p++;
	}
	return 0;
}
//????

char out[100];
int ct, sig;

int main()
{
	char x;
	while ( (x = cin.get()) != '\n' ) {
		if ( x >= '0' && x <= '9' ) {
			out[ct] = x;
			++ct;
			sig = 1;
		}
		else if ( sig ) {
			out[ct] = '\n';
			++ct;
			sig = 0;
		}
		else continue;
	}

	for ( int i = 0; i != ct; ++i ) cout << out[i];
	if ( out[ct - 1] != '\n' ) cout << endl;

	return 0;
}
int main()
{
    int a[30]={0}, m, i, flag=0;
    char *pt;
    char c[30];
    for(i=0;i<30;i++)
    {
        scanf("%c",&c[i]);
    }
    pt=&c[0];
    m=strlen(c);
    for(i=0;i<m;i++)
    {
        if(c[i]<='9'&&c[i]>='0')
            a[i]=1;
    }
    for(i=0;i<m;i++)
    {
        if(a[i]==1)
        {
            printf("%c",c[i]);
            flag=1;
        }
        if(a[i]==0&&flag==1)
        {
            printf("\n");
            flag=0;
        }
    }
    return 0;
    
}
int powe( int i )//??? 
{
	int j = 0 , sum = 1;
	if( i > 0 )
		for( j = 0 ; j <= i - 1 ; j ++ )
			sum = sum * 10;
	return sum;
}
int main()
{
	char ch[50];
	cin.get( ch , 50 , '\n' );
	int num[50] = {0};
	char *p;
	int i = 0 , counter = 0;
	for( p = ch ; *p != '\0' ; p )
	{
		if( *p < '0' || *p > '9' )
			p ++;

		else if( *p >= '0' && *p <= '9' )
		{
			int weishu = 0;
			while( *p >= '0' && *p <= '9' && *p != '\0' )//?????????? 
			{
				p ++;
				weishu ++;//?????? 
			}
			for( i = 1 ; i <= weishu ; i ++ )
				num[counter] = num[counter] + ( *( p - i ) - '0') * powe(i - 1);
			counter ++;
			continue;
		}
	}
	for( i = 0 ; i <= counter - 1 ; i ++ )
		cout << num[i] << endl;
	return 0;
}
int main()
{
	int i=0;
	char a[30];
	cin.getline(a,31,'\n');
	for (i=0;a[i]!='\0';i++)
	{
		if ((a[i]>='0')&&(a[i]<='9'))
		{
			cout<<a[i];
		}
		else
		{
			if (i!=0)  cout<<endl;
			while (1)
			{
			if (((a[i+1]<'0')||(a[i+1]>'9'))&&((i+1)<=33))   i++;
			else break;
			}
		}
	}

	return 0;
}
int main()
{
char c[50];
int i=0,flag=0;
gets(c);
while (i<=strlen(c))
{
if (c[i]>='0'&&c[i]<='9') 
	if (flag==0) {flag=1;printf("\n%c",c[i]);} else printf("%c",c[i]);
else flag=0;
i++;
}
}
int main(){
	char a[31];
	cin.getline(a,31);
	int len=strlen(a);
	for(int i=0;i<len;i++){
		if('0'<=a[i]&&a[i]<='9') cout<<a[i];
		else{
			cout<<endl;
			for(int j=i;j<len;j++){
				if('0'<=a[i]&&a[i]<='9'){
					cout<<a[j];
					break;
				}
				i++;
			}
		}
	}
	return 0;
}
int main(){
	int i,sum=0,f=1;

	char *p=(char *)malloc(sizeof(char)*100);
	gets(p);
	for (i=0;i<strlen(p);i++)
		if (*(p+i)>=48 && *(p+i)<=57) {
			f=0;sum=0;printf("%c",*(p+i));
		}
		else {
			sum++;
			if (sum==1 && f==0) printf("\n");
		}
	free(p);
}
int main()
{
	char a[31];
	cin.get(a,31,'\n');

	int i=0;
	for(;a[i] != 0;i++)
	{
		if(!(a[i]>47 && a[i]<58))
			continue;
		int j=i;
		for(;j<=30;i++,j++)
			if(a[j]>47 && a[j]<58)
				cout<<a[j];
			else
			{
				cout<<endl;
				break;
			}
	}


	return 0;
}
int main()
{
	char str[31];
	char *p=str;
	cin.getline(str,31);
	int l=strlen(str);
	for(p=&str[0];p<&str[0]+l;p++)
	{
		if(*p>='0'&&*p<='9') cout<<*p;
		else if(*(p+1)>='0'&&*(p+1)<='9') cout<<endl;
	}
	return 0;
}
void main()
{

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


}
/*
 * coutnum.cpp
 * ????
 *  Created on: 2012-12-14
 *      Author: 12219
 */
int main() {
	char a[30], *p;
	int b;
	cin.getline(a, 31);
	b = strlen(a);
	for (p = a; p < a + b; p++) {
		if (*p >= '0' && *p <= '9')
			cout << *p;
		else
			cout << endl;
	}
	return 0;
}
int main()
{
	int i,l;
	char x[100],*p;
	gets(x);
	l=strlen(x);
	p=x;
	for(i=0;i<l;i++)
	{
		if((x[i]>='0'&&x[i]<='9')==0)
		{
			x[i]=0;
		}
	}
	cout<<p<<endl;
	
		for(i=0;i<l;i++)
		{
			if(x[i]==0&&x[i+1]!=0)
			{
				cout<<(p+i+1)<<endl;
			}
		}



		return 0;
}
int main()
{
	int i;
	char s[30];
	gets(s);
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>='0'&&s[i]<='9')
		{
			if(s[i+1]>='0'&&s[i+1]<='9')
				printf("%c",s[i]);
			else
				printf("%c\n",s[i]);
		}
	}
	return 0;
}
int main()
{
	char c;
	while (c != '\n')
	{
		scanf("%c",&c);
		if(c >= '0' && c <= '9')
			printf("%c",c);
		else
			printf("\n");	
	}
	return 0;
}
int main()
{
	int i=0,l,flag;
	char c[31];
	cin.getline(c,31);
	for(i=0;;i++)
		if(c[i]=='\0')
			break;
	l=i;
	char *a=c;
	for(i=0;i<l;i++)
		if(*(a+i)>='0'&&*(a+i)<='9')
			{
				cout << *(a+i);
				flag=0;
			}
		else
			if(flag==0)
				{
					cout << endl;
					flag=1;
				}
	return 0;
}
void sum(char *p)
{
	int a[10],i,j=0,b=0;
	for(i=0; *(p+i)!='\0'; i++)
	{
		if(*(p+i)>='0'&&*(p+i)<='9')
		{
			b=*(p+i)-48+b*10;
			if (*(p+i+1)<'0'||*(p+i+1)>'9')//||
			{
				a[j]=b;
				j++;
				b=0;
			}
		}
	}
	for(i=0; i<j; i++)
	{
		printf("%d",a[i]);
		printf("\n");
	}

}
int  main()
{
	void sum(char *p);
	char s[50],*p=s;
	gets(s);
	sum(p);
		return 0;
}
int main(){
	char a[31];
	cin.getline(a,31);
	int i,j=0;
	for(i=0;i<strlen(a);i++){
		if(i==(strlen(a)-1)){
			if(('0'<=a[i])&&(a[i]<='9')){cout<<a[i]<<endl;}
					else if(j==0){cout<<endl;j=1;}
		}
		else if(('0'<=a[i])&&(a[i]<='9')){cout<<a[i];j=0;}
		else if(j==0){cout<<endl;j=1;}
	}
	return 0;
}
int main()
{
	char a[31];
	cin.getline(a,32,'\n');
	int i;
	for(i=0;a[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] >'9' || a[i+1] < '0' || a[i+1]=='\0') )
		{
			cout << a[i] << endl;
		}
	}
	return 0;
}
void main()
{
	char *str,*p;
	int k=1;
	str=(char *)malloc(30*sizeof(char));
	gets(str);
	p=str;
	for(;p<str+30;p++)
	{
		if(*p>='0'&&*p<='9'){printf("%c",*p);k=1;}
		else if(k){printf("\n");k=0;}
	}
	free(str);
}
int main()
{
	char a[35];
	gets(a);
	char* end=a+strlen(a);
	for (char *i=a;i<end;i++)
	{
		if (*i>='0' && *i<='9')
		{
			printf("%c",*i);
		}
		else
		{
			while (!(*i>='0' && *i<='9'))
			{
				i++;
			}
			i--;
			printf("\n");
		}
	}
	return 0;
}
/**
  *file  ????
  *author ???
  *date   12.9
  *function		???????????????????????
  ?????????????????????????????????????
*/
int main()
{
	char a[100] = {0}, *p = NULL;
	int flag = 0, lena;
	p = a;
		memset(a,0,100);
		cin.getline(a,100);
		lena = strlen(a);
		while(*p != '\0')
		{
			if(*p <= '9' && *p >= '0')
			{
				cout << *p;
				flag = 1;
			}
			else
			{
				if(flag)
				{
					cout << endl;
					flag = 0;
				}
			}
			p++;
		}
		if(*(p + lena - 1) <= '9' && *(p + lena - 1) >= '0')
		{
			cout << endl;
		}
	return 0;
}
int main()
{
	char str1[31], str2[31], *p1, *p2;
	cin.getline(str1, 31);
	int flag = 0;
	for(p1 = str1, p2 = str2; *p1 != '\0'; p1++,p2++)
	{
		*p2 = *p1;
		if(*p1 - '0' < 0 || *p1 - '0' > 9)
		{
			flag++;
			if(flag >= 2)
				p2--;
		}
		else
			flag = 0;
	}
	*p2 = '\0';
	for(p2 = str2; *p2 != '\0'; p2++)
	{
		if(*p2 - '0' >= 0 && *p2 - '0' <= 9)
			cout << *p2;
		else
			cout << endl;
	}
	return 0;
}
void main()
{
 char *p;
 int i;
 p=(char *)malloc(31*sizeof(char));
 for(i=0;i<31;i++)
    scanf("%c",(p+i));
 for(i=0;i<31;i++)
    {
     if((*(p+i)!='0')&&(*(p+i)!='1')&&(*(p+i)!='2')&&(*(p+i)!='3')&&(*(p+i)!='4')&&(*(p+i)!='5')&&(*(p+i)!='6')&&(*(p+i)!='7')&&(*(p+i)!='8')&&(*(p+i)!='9'))
     printf("\n");
     else
     printf("%c",*(p+i));
    }
}
int main() {
	char s[31];
	
	char *p;
	gets(s);
	p=s;
	while((*p)!='\0')
	{
	for(;(*p)>='0'&&(*p)<='9';p++)
	{
		printf("%c",*p);
		}

	if((*p)!='\0')
	p++;
	printf("\n");
	}
	return 0;
}
/* Note:Your choice is C IDE */
void main()
{char s[100];int i,flag1=-1,flag2=-1,m;
	gets(s);
	m=strlen(s);
	for(i=0;i<m;i++)
	{
		if(s[i]>='0'&&s[i]<='9') printf("%c",s[i]);
		if((s[i]>='0'&&s[i]<='9')&&(!(s[i+1]>='0'&&s[i+1]<='9'))) printf("\n");  
}}
int main()
{
	char a[300];
	int i,n,b[20]={0},k=0,num=0;
	gets(a);
	n=strlen(a);
	a[n]=' ';
	for(i=0;i<n+1;i++)
	{
		if(a[i]-'0'>=0&&a[i]-'0'<10)
			num=num*10+a[i]-'0';
		else if((a[i-1]-'0'>=0&&a[i-1]-'0'<10)&&(a[i]-'0'<0||a[i]-'0'>=10))
		{
			b[k]=num;
			num=0;
			k++;
		}
	}
	for(i=0;i<k;i++)
	{
		if(i==0)
			printf("%d",b[i]);
		else
			printf("\n%d",b[i]);
	}
	
	return 0;
}
int main( )
{	
	char test[MAX_LENGTH];
	char *pTest=test;
	cin.getline(test,MAX_LENGTH);
	while(true) //??????
	{

		if(*pTest==0) break;

		if (*pTest>='0'&&*pTest<='9')  //????
		{
			cout<<*pTest;
			if (*(pTest+1)<'0' ||*(pTest+1)>'9')
				cout<<endl;
		}
		pTest++;
	}
	return 0;
}