semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    char a[35] ;
    cin.getline(a,35) ;
    int n , i , j ,m[35] ;
    n = strlen(a) ;
    for ( i = 0 ; i <= 34 ; i ++ )
    m[i] = -1 ;
    j = 0 ;
    for ( i = 0 ; i <= n - 1 ; 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')
        {
                if ( m[j] == -1)
                m[j] = ( m[j]+ 1 ) * 10 + a[i] - '0' ;
                else
                m[j] = m[j]  * 10 + a[i] - '0' ;
        }
        else
        j ++ ;
    }
    for ( i = 0 ; i <= j ; i ++ )
    {
        if ( m[i] != -1 )
        cout << m[i] << endl ;
    }
        return 0 ;
}
int main()
{
	char ch[31];
	int i , len;
	cin.getline( ch , 31 , '\n');
	len = strlen(ch);
	for (i = 0 ; i <= len - 2 ; i++)
	{
		if ((ch[i] >= 48)&&(ch[i] <= 57))
		{
			if ((ch[i + 1] >= 48)&&(ch[i + 1] <= 57))
			{
				cout << ch[i];
			}
			else 
			{
				cout << ch[i] << endl;
			}
		}
	}
	if ((ch[len - 1] >= 48)&&(ch[len - 1] <= 57))
	{
		cout << ch[len - 1] << endl;
	}
	return 0;
}
int main()
{
	char a[31];
	cin.getline(a,31,'\n');
	int i=0;
	while(i<=strlen(a))
	{
	if(a[i]<='9'&&a[i]>='0')
	{
		cout<<a[i];
		i++;
	}
	else if(a[i+1]<='9'&&a[i+1]>='0')
	{
		cout<<endl;
		i++;
	}
	else
		i++;
	}
	return 0;
}
int main()
{
	char *p;
	int n,i;
	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));
		}
		else if(*(p+i+1)>='0'&&*(p+i+1)<='9')
		{
			printf("\n");
		}
	}
	return 0;
}
int main(){
	char str[100]={0};
	cin.getline(str,99);//????????

	for(int i=0;i<100;i++){//???????????????
		if(*(str+i)<'0'||*(str+i)>'9') *(str+i)=0;
	}

	for(int i=0;i<100;){//???????????????
		if(*(str+i)==0){
			i++;
			continue;
		}else{
			cout<<str+i<<endl;
			i+=strlen(str+i);
		}
	}
}
int main()
{
	int len,i;
	char c[31];
	cin.getline(c,31);
	len=strlen(c);

    for(i=0;i<len;i++)
	{
		if(c[i]>='0'&&c[i]<='9'&&c[i+1]>='0'&&c[i+1]<='9')
			cout<<c[i];
		if(c[i]>='0'&&c[i]<='9'&&(c[i+1]<'0'||c[i+1]>'9'||i == len -1))
			cout<<c[i]<<endl;
	}
	return 0;
}
int main()
{
	char s[31];
	int i,j,k=0,l;
	gets(s);
	l=strlen(s);
	for(i=0;i<l;i++)
	{
		if(s[i]>='0' && s[i]<='9')
		{
			printf("%c",s[i]);
			k=0;
		}
		else if(k==0)
		{
			printf("\n");
			k=1;
		}
	}
	return 0;
}
int main()
{
    char a[30],i; 
    for(i=0;i<30;i++)
        a[i]=' ';           //?????????????
    
    gets(a);                //????????
    
    for(i=0;i<30;i++){
        if(a[i]==48||a[i]==49||a[i]==50||a[i]==51||a[i]==52||a[i]==53||
           a[i]==54||a[i]==55||a[i]==56||a[i]==57){   //ASCII???
            printf("%c",a[i]);       //????????????
            if(i+1<30&&(a[i+1]<48||a[i+1]>57))
                printf("\n");       //??????????????????
        }
    }

    return 0;
}
void main()
{
 char a[30];
 int i,flag=1;
 gets(a);
 char *p=a;
 for(i=0;i<strlen(a);i++)
 if(*(p+i)>='0'&&*(p+i)<='9')
 {printf("%c",*(p+i)); flag=0;}
 else if(*(p+i+1)>='0'&&*(p+i+1)<='9'&&flag==0)
 printf("\n");
}
//**********************************************
//**???????******************************
//**?????? 1000012741*********************
//**???2010?12?10?************************
//**********************************************
int main()
{
	char str[31], *p;                    //??str????,p???
	cin.getline(str, 31);                //?????
	p = str;                             //?p?????????
	int flag = 0;                        //flag???????????
	do
	{
		if (*p >= '0' && *p <= '9')      //????????
		{
			cout << *p;                  //?????
			p++;                         //??????????
			flag = 1;                    //?flag?1
		}
		else                             //?????????
		{
			p++;                         //??????????
			if (*p >= '0' && *p <= '9' && flag == 1)  //?????????????????
				cout << endl;            //??
		}
	} while (*p != '\0');                //??????????
	cout << endl;
	return 0;
}
//*********************************************
int main()
{
   int i,j=1;
   char a[31];
   cin.getline(a,31);
   for(i=0;i<31;i++)
   {
	   if(a[i]>=48&&a[i]<=57)
	   {
		   cout<<a[i];
		   j=0;
	   }
	   else
	   {
		   if(j==0)
		   {
			   cout<<endl;
			   j=1;
		   }
	   }
   }
   return 0;
}
int main()
{
	char *a;
	int i,*symbol;
	a=(char*)malloc(30*sizeof(char));
	gets(a);
	symbol=(int*)malloc(strlen(a)*sizeof(int));
	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(int argc, char* argv[])
{
	char sz[31];
	int i;
	gets(sz);
	for(i=0;i<30;i++){
		if(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'||sz[i]=='0'){
			printf("%c",sz[i]);
			continue;
		}else{
			if(i==0){
				continue;
			}
			if(sz[i-1]=='1'||sz[i-1]=='2'||sz[i-1]=='3'||sz[i-1]=='4'||sz[i-1]=='5'||sz[i-1]=='6'||sz[i-1]=='7'||sz[i-1]=='8'||sz[i-1]=='9'||sz[i-1]=='0'){
				printf("\n");
			}
		}
	}
	return 0;
}
int main()
{
	int i,l,flag;
	char s[31];
	cin.getline (s,31);
	l = strlen (s);
	flag = 0;
	for (i = 0; i <= l-1 ; i++)
		if ((s[i] >= '0') && (s[i] <= '9'))
		{
			flag = 1;
			cout << s[i];
		}
		else
		{
			if (flag == 1) 
				cout << endl;
			flag = 0;
		}
	return 0;
}
int main()
{
	char an[100];
	cin.getline(an,100);
	int i,j=0;
	char bn[100];
	int n=0;
	for(i=0;i<strlen(an);	)
	{
		if(an[i]>='0'&&an[i]<='9')
		{
			bn[j]=an[i];
			i++;
			j++;
			while(an[i]>='0'&&an[i]<='9')
			{
				bn[j]=an[i];
				j++;
				i++;
			}
			bn[j]=' ';
			j++;
			i++;
			n++;
		}
		else i++;
	}

	for(int k=0;k<j-1;k++)
	{
		if(bn[k]==' ')
			cout<<endl;
		else 
			cout<<bn[k];
	}
	return 0;
}
int main()
{
	char *p,a[31],count,i;
	cin.getline(a,31);
	p=a;
	count=0;
	for(i=0;*(p+i)!='\0';i++)
	{
		if(*(p+i)>='0'&&*(p+i)<='9')
		{
			cout<<*(p+i);
			count=0;
		}
		else
		{
			count++;
			if(count==1)
			{
				cout<<endl;
			}
		}
	}
	
	return 0;
}
// ???? 
int main()
{
    int i=0;
    char c[31]={'0'};
    cin.get(c,31);
    for (i=0;i<30;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')
        {
            if (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')                                                 
                cout<<c[i];
            else
                cout<<c[i]<<"\n";
        }
    }
    return 0;
}
int main()
{
	char a[101];
	char *p;
	cin.getline(a,101);
	p=a;
	int i=0,j=0;
	while (*p!='\0')
	{
		if(*p=='-')
		{
			i=1;
			p++;
			if(j==1)
			{
				cout<<endl;
				j=0;
			}
		}
		else if(((*p=='0')||(*p=='1')||(*p=='2')||(*p=='3')||(*p=='4')||(*p=='5')||(*p=='6')||(*p=='7')||(*p=='8')||(*p=='9'))&&(i==0))
		{
			cout<<*p;
			p++;
			j=1;
		}
		else if(((*p=='0')||(*p=='1')||(*p=='2')||(*p=='3')||(*p=='4')||(*p=='5')||(*p=='6')||(*p=='7')||(*p=='8')||(*p=='9'))&&(i==1))
		p++;
		else  
		{
			p++;
			i=0;
			if(j==1)
			{
				cout<<endl;
				j=0;
			}
		}	
	}
	return 0;
}
int main()
{
    char *p;
    int i,l;
    p=(char *)malloc(30*sizeof(char));
    gets(p);
    l=strlen(p);
    for (i=0;i<l-1;i++)
    {
        
        if (isdigit(*(p+i)))
        printf("%c",*(p+i));
        if (isdigit(*(p+i))&&isdigit(*(p+i+1))==0)
        printf("\n"); 
    }
    if (isdigit(*(p+l-1)))
    printf("%c",*(p+l-1));
    return 0;
}
int main()
{
 char c[31];
 int i,j,k;
 cin.getline(c,31,'\n');
 for(i=0;i<strlen(c);i++)
 {
  if(c[i]>='0'&&c[i]<='9')
   cout<<c[i];
  if(c[i-1]>='0'&&c[i-1]<='9'&&(c[i]<'0'||c[i]>'9'))
  {
   k=0;
   for(j=i+1;j<strlen(c);j++)
    if(c[j]>='0'&&c[j]<='9')
     k=1;
   if(k==1)
    cout<<endl;
  }
 }
 return 0;
}
/*
 * tiqushuzi.cpp
 *
 *  Created on: 2010-12-13
 *      Author: ??
 *      ????????
 */
int main()
{
	char str[31], *p=NULL;
	int i ;
	cin.getline(str,31);//?????
	p=str;//???????????
	for(i=0;*p!='\0';p++)
	{
		if(*p>='0'&&*p<='9')  cout << *p;//???????
		else if(*(p-1)>='\0'&&*(p-1)<='9') cout << endl;//???????????
	}
	return 0;
}
int main()
{
	char a[40];int i;
	cin.getline(a,31,'\n');
	for(i=0;i<strlen(a);i++)
		if(a[i]>='0'&&a[i]<='9')
			cout<<a[i];
		else cout<<endl;
	return 0;
}
main()
{
 char a[100],b[10];
 int n,i,j;
 gets(a);
 n=strlen(a);
 for (i=0;i<10;i++)
 b[i]='0'+i;
 for (i=0;i<n;i++)
 {
   for (j=0;j<10;j++)
   {
    if (a[i]==b[j]  &&   ( (a[i+1]-'0'>=0) || ( a[i+1]-'0'<=9 ) ) )
    printf("%c",b[j]);
    
    if ( a[i]==b[j]  &&   ( (a[i+1]-'0'<0) || ( a[i+1]-'0'>9 ) ) )
    printf("\n",b[j]);
   }
 }
}
//
//  Created by Chu-Pan,Wong on Dec 10, 2013.
//  Copyright (c) 2013 ChuPan,Wong. All rights reserved.
//



int main(int argc, char** argv){
    char s[31];
    gets(s);
    int len = (int)strlen(s);
    char* p=s;
    char* q;
    for (int i = 0; i<len; i++){
        if (*(p+i) >= '0' && *(p+i) <= '9') {
            q = p+i;
            i++;
            while (*(p+i) >= '0' && *(p+i) <= '9') {
                i++;
            }
            *(p+i) = 0;
            printf("%s\n", q);
        }
    }
    return 0;
}
int main()
{
	char a[31];
	int i;
	cin.getline(a, 31);
	for (i = 0; i < strlen(a); i++)
	{
		if (isdigit(a[i]))
		{
			if (!isdigit(a[i+1]))
				cout << a[i] << endl;
			else
				cout << a[i];
		}
	}
	return 0;
}
//@@@@???????@@@@@@@@@@@//
//@@@@?????@@@@@@@@@@@@@@@//
//@@@@???12/11@@@@@@@@@@@@@@//
int main()
{
	char str[31]; // ??????
	int i, j, l, a[31] = { 0 },*p=a; // l???????????????a[31]????????
	cin.getline(str, 31); // ?????
	l = strlen(str); // ????????
    for (j = '0'; j <= '9'; j++)
	{
		if (str[0] == j)
		{
			cout << str[0];
			*p = 1;
			break;
		}
	} // ?????????
	for (i = 1; i < l; i++)
	{
		for (j = '0'; j <= '9'; j++)
		{
			if(str[i] == j)
			{
				cout << str[i];
				*(p+i)= 1;
				break;
			}
		}
		if (*(p + i - 1) == 1 && j == '9' + 1)cout << endl; // ??a[i]????a[i-1]??????
	 }
}
int main(){
	char a[31],*p;
	cin.getline(a,31);
	p=a;
	int flag=0,sum=0;
	for(int i=0;p[i]!='\0';i++){
		if(p[i]>='0'&&p[i]<='9'){
			flag=0;
			cout<<p[i];
			sum++;
		}
		else{
			flag++;
			if(sum!=0&&flag==1){
				cout<<endl;
				sum=0;
			}
		}
	}
	return 0;
}
int main()
{
	char str[100];
	cin.getline(str,31);
	int len=strlen(str),temp=0;
	for (int i=0;i<len;i++)
	{
		if (str[i]>='0' && str[i]<='9' && (str[i+1]>'9' || str[i+1]<'0'))
			cout<<atoi(str+temp)<<endl;
		if ((str[i]<'0' || str[i]>'9') && str[i+1]<='9' && str[i+1]>='0')
			temp=i+1;
	}
	return 0;
}
void main()
{
  char s[30],* ps;
  int i,j,k,m,e,d,n,a[10],* pa;
  gets(s);  
  ps=s;
  pa=a;
  n=0;
  i=0;
  j=0;
  while(* (ps+i)!='\0')
  {if((*(ps+i)>='0')&&(*(ps+i)<='9'))
  j++;
  else
  {if(j>0)
  {d=* (ps+i-1)-48;
  k=1;
  while(k<j)
  {e=1;
  for(m=1;m<=k;m++)
	  e=e*10;
  d=d+(* (ps+i-1-k)-48)*e;
  k++;
  }
  *pa=d;
  n++;
  pa++;
  j=0;
  }
  }
  i++;
  }
  if(j>0)
  {d=* (ps+i-1)-48;
  k=1;
  while(k<j)
  {
	  e=1;
	  for(m=1;m<=k;m++)
		  e=e*10;
	  d=d+(* (ps+i-1-k)-48)*e;
	  k++;
  }
  *pa=d;
  n++;
  j=0;
  }
  j=0;
  pa=a;
  for(j=0;j<n;j++)
printf("%d\n",* (pa+j));	
}
int main()
{const int maxn=31;
  char c[maxn],*p;

  gets(c);
  p=c;
  while(*p!='\0')
    if(*p>=48 && *p<58)
    { do{
   	    cout<<*p;
        p++;
      }while(*p>47 && *p<58);
      cout<<endl;
    } else p++;

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




}
int main()
{
	int i,a=0,sum=0;     //a???????????????????????
	char zf[30];
	gets(zf);
	for(i=0;i<30;i++){                     //???????
		if('0'<=zf[i]&&zf[i]<='9'){      //????
			sum++;                  //????????
                            a=0;
			printf("%c",zf[i]);     //??????
		}  
		else if(a==0){                   //?????????????
			printf("\n");
			a=1;
		}
	}
	return 0;
}
int main()
{
    char input_number[30];
    gets(input_number);

    int indicator;
    int cool=0;
    for(indicator=0;indicator<strlen(input_number);indicator++)
    {
        if(isdigit(input_number[indicator]))
        {
        cool=0;
        putchar(input_number[indicator]);
        }
        else if(cool==0)
        {
            printf("\n");
            cool=1;
        }
    }
    return 0;
}
/*
@file 1000012837_3.cpp
@date 20101208
@author ???
@description ????
*/
int main()
{
	char str[31], *p = NULL;
	int l, flag = 0;
	cin.getline(str, 31);	//?????
	l = strlen(str);	//l??????
	for(p = str; p < str + l; p++)	//p????????????????????
	{
		if(*p >= '0' && *p <= '9')	//????????????1
		{
			flag = 1;
			cout << *p;
		}
		else
		{
			if(flag == 1)//?????????????????????0
			{
				cout << endl;
				flag = 0;
			}
		}
	}
	return 0;
}
int main()
{
	char* string=(char*)malloc(30);
	gets(string);
	char *p=string;
	int len=strlen(string);
	for(;p<string+len;p++)
	{
	    int anynumber=0;
		while(*p>='0'&&*p<='9')
	    {
		printf("%c",*p);
		p++;
		anynumber++;
	    }
		if(anynumber)
		{
			printf("\n");
		}
	}
}
int main ()
{
	char *p;

	char a[32];

	cin.getline (a,31);

	for (p=a;*p!='\0';p++)
	{
		if (*p>57||*p<48)
		{
			cout <<endl;
			p++;
			while ((*p>57||*p<48)&&*p!='\0')
			{
				p++;
			}
			p--;
		}
		else cout <<*p;
	}

	return 0;
}
/*
 * Pointer1.8GetNumber.cpp
 * ????
 *  Created on: 2012-12-21
 *      Author: ???
 *      ??:??????????????????????????
 */
int main(){
	char *p;
	char a[33];
	gets(a);//??????a??????
	p=a;
	while(p-a <= strlen(a)){//???a??????
		if(*p == '-')
			{p++;
			while(*p>='0' && *p <='9')
			p++;}                //?????????????
		else if(*p>='0' && *p<='9')//????
			{cout<<*p;
			if(*(p+1)<'0' || *(p+1)>'9')//????????
			cout<<endl;
			p++;}
		else if(*p<'0' || *p>'9')
			p++;//???????
	}//while????

		return 0;
}
int main(){
	char a[60];
	char *p=a;
	cin.getline(p,59);
	int i=0,len=strlen(p);
	do{
		if(p[i]=='-') do{
			i++;
		}while(p[i]<48||p[i]>57);
		if(p[i]>=48&&p[i]<=57){
			do{
				cout <<p[i];
				i++;
			}while(p[i]>=48&&p[i]<=57);
			cout << endl;
		}else i++;
	}while(i<len);
	return 0;
}
int main()
{
	char str[31], *p;
	cin.getline(str,31);
	p=str;
	do
	{
		if (*p>='0'&&*p<='9')
		{
			cout << *p;
			p++;
		}
		else
		{
			p++;
			if (*p>='0'&&*p<='9')
				cout << endl;
		}
	} while (*p!='\0');
	cout << endl;
	return 0;
}
int main()
{
	char s[80];
	gets(s);
	char* p;
	p = s;
	int n;
	while(*p != '\0')
	{
		if(p-s > 0 && (*(p-1) <'0' || *(p-1) > '9' ) && n == 0)
		{
			cout << endl;
			n++;
		}
		if(*p>='0' && *p<='9')
		{
			cout << *p;
			n = 0;
		}
		p++;
	}
	return 0;
}
/*
 * ???8.cpp
 * Created on: 2012-12-12
 * Author: ???
 * ??:????
 */
int main(){
	char str[40];  //??????
	gets(str);     //?????
	char *p=str;         //????
	int len,i,k=0;          //????
	len=strlen(str);    //????
	if(len==1){
		if(*(p+0)>='0' && *(p+0)<='9')
			cout<<*(p+0);
	}
	for(i=0;i<len-1;i++)  //????
	{
        if(*(p+i)>='0' && *(p+i)<='9') //??????? ???
        	{
        	cout<<*(p+i);k=1;
             if(*(p+i+1)<'0' || *(p+i+1)>'9') //??????? ???
        	 {cout<<endl;k=0;}
        	}
	}
	if(k==1)      //???????????
		cout<<*(p+len-1)<<endl; //??????
	else if(*(p+len-1)>='0' && *(p+len-1)<='9')
		cout<<*(p+len-1);
 return 0;  //????
}
/*
 * 12-4.cpp
 *
 *  Created on: 2011-12-25
 *      Author: sony
 */

int main()
{
	char input[35];
	cin.getline(input, 35);
	int i, j;
	int len = strlen(input);
	for (i = 0; i < len; i++){
		if (input[i] >= '0' && input[i] <= '9') {
			cout << input[i];
			for (j = i + 1; ; j++) {
				if (input[j] >= '0' && input[j] <= '9') {
					cout << input[j];
				} else {
					cout << endl;
					break;
				}

			}
			i = j;
		}
	}
	return 0;
}
void main()
{
   char *a;
   int i,n=0,j=0,*b;
   a=(char*)malloc(30*sizeof(char));
   b=(int*)malloc(30*sizeof(int));
   for(i=0;i<30;i++)
   {*(a+i)='\0';*(b+i)='\0';scanf("%c",a+i);}
   
   for(i=0;*(a+i)!='\0';i++)
	{   if(*(a+i)<':'&&*(a+i)>'/') 
	 printf("%c",*(a+i));
            if(*(a+i)>=':'||*(a+i)<='/'&&*(a+i+1)<':'&&*(a+i+1)>'/')
                  printf("\n"); 
             }




}
void main()
{
   int i;
   char *p;
   char c1,c2;
   p=(char*)calloc(30,sizeof(char));
   gets(p);
   for(i=0;*(p+i)!='\0';i++)
   {  c1=*(p+i);
   c2=*(p+i+1);
      if(c1>47&c1<58)
      {printf("%c",c1);
      if(c2<48||c2>57)
      printf("\n");
      } 
      }              
}
void main()
{
	int a;
	int i=0;
	for(;a!='\n';)
	{
	a=getchar();	
	if(a>=48 && a<=57)
	{printf("%c",a);i=0;}
	else if((a<48 || a>57)&&(i==0))
	{i++;printf("\n");continue;}
	else continue;
	}
}
int main()
{
   char str[30];
   gets(str);
   char *str_pointer;
   str_pointer=str;
   int i,flag,count;
   flag=count=0;
   for(i=0;str[i];i++)
   {
	   if(str[i]>='0'&&str[i]<='9')
	   {
		 printf("%c",str[i]);
		 flag=0;
	   }
	   else if(flag==0)
	   {
		   printf("\n");
		   flag=1;
	   }
   }
   return 0;
}
int main()
{
  char str[31];
  cin.getline(str,31);
  for(int i=0;str[i];i++)
  {
	  if((str[i]<='9'&&str[i]>='0')&&(str[i+1]<='9'&&str[i+1]>='0'))
		  cout<<str[i];
	  if((str[i]<='9'&&str[i]>='0')&&!(str[i+1]<='9'&&str[i+1]>='0'))
		  cout<<str[i]<<endl;
  }
  return 0;

}
// ????1.cpp : Defines the entry point for the console application.
//


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

	cin.getline(num,31);

	int len = strlen( num );
	
	p = num;
	m = 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;
		p++;
		

	}

	return 0;
}
void main()
{
char a[1000];
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 a[30];
    int i;
    gets(a);
    for(i=0;i<30;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'){
                                                                                                                   printf("%c",a[i]);
                                                                                                                   }
                      else printf("\n");
                      }
    return 0;
}
int main()
{
	char c[100],*p=c;
    int a[50],*q=a,num=0,i;
    gets(c);
    for(; *p!='\0'; p++)
		if(*p>='0' && *p<='9'){
			*q=(*p)-'0';
            p++;
			while(*p>='0' && *p<='9')
				*q=(*q)*10+(*(p++)-'0');
			num+=1;
			q+=1;
		}
	for(i=0,q=a; i<num; i++,q++)
		printf("%d\n",*q);        
}
int main(){
	int i=0,j=0;
	char shuru[50],shuchu[50],*p,*q;
	p=shuru;
	q=shuchu;
	while(1)
	{
		shuru[i]=cin.get();
		if(shuru[i]=='\n')break;
		i++;
	}
	for(int k=0;k<i;k++)
	{
		if(*p>='0'&&*p<='9')
		{
			*(q++)=*(p++);
			j++;
		}
		else if(*(q-1)=='\n')
		{p++;}
		else
		{
			*(q++)='\n';
			j++;
			p++;
		}
	}
	for(int k=0;k<j;k++)
	{
		cout<<shuchu[k];
	}
	return 0;
}
int main()
{
	char x,a;
	int i,m=0;

	for(i=0;i<30;i++){
		scanf("%c",&x);
		if(x=='1'||x=='2'||x=='3'||x=='4'||x=='5'||x=='6'||x=='7'||x=='8'||x=='9'||x=='0'){
			a=x;
			printf("%c",x);
		}
		else if(a=='1'||a=='2'||a=='3'||a=='4'||a=='5'||a=='6'||a=='7'||a=='8'||a=='9'||a=='0'){
				a=x;
				printf("\n");
		}
	}
	return 0;
}
int main(int argc, char *argv[])
{
  int i,j,k;
  char c[50];
  gets(c);
  k=strlen(c);
  for(i=0;i<k;i++)
  {
   if(c[i]>=48&&c[i]<=57)
   {
    if(c[i+1]>=48&&c[i+1]<=57)printf("%c",c[i]);
    else
    printf("%c\n",c[i]);
   }
  }
	
  return 0;
}
void main()
{
    char *c,*p,*p1;
    c=(char*)malloc(1000*sizeof(char));
    int a=0;
    p=c;
    gets(c);
    for(c=p;*c!='\0';c++)
    {
        if(*c>='0'&&*c<='9')
        {
            printf("%c",*c);
            a=1;
        }
        else if(a==1)
			for(p1=c;*p1!='\0';p1++)
				if(*p1>='0'&&*p1<='9')
				{ 
					printf("\n");
					a=0;
					break;
				}
    }
}
main()
{
      char s[31];
      int i,n;
      gets(s);
      n=strlen(s);
      for(i=0;i<n;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')//???i???????? 
          {if(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]);
          else
          printf("%c\n",s[i]);
          }
      
      }
      getchar();
      getchar();
}
int main()
{
    char str[100];
    int i,j=0,l;
    gets(str);
    l=strlen(str);
    str[l+1]==' ';
    for(i=0;i<=l;i++)
    {
        if(str[i]>='0'&&str[i]<='9') str[j++]=str[i];
        if(str[i]>='0'&&str[i]<='9'&&(str[i+1]>'9'||str[i+1]<'0')) str[j++]='\n';
        if(str[i]=='\0') str[j]='\0';
        }
        for(j=0;str[j]!='\0';j++)
        printf("%c",str[j]);
        return 0;
        }
int main()
{
   char q,*p;
   int now;
   scanf("%c",&q);
   while (!((('0'<=q) && ('9'>=q)))) 
       {  
         scanf("%c",&q);
       //  printf("%c\n",q);
         }
   long tot=0;
   while (q!='\n') 
      {
           if (('0'<=q)&& ('9'>=q))
                  { 
                          tot=tot*10+q-'0';
                          now=1;       
                  }                                    
               else if (tot!=0){
                       printf("%d\n",tot);
                       tot=0;
                       now=0;
                    }
           scanf("%c",&q);
      }    
   if( now !=0) printf("%d\n",tot);
     //      scanf("%c",&q);
     //      scanf("%c",&q);
}
int main()
{
	char *p;
	int i;
	p=(char *)malloc(30*sizeof(char));
	gets(p);
	for (i=0;i<strlen(p);i++)
	{
		if (*(p+i)>=48&&*(p+i)<=57)
			printf("%c",*(p+i));
		else if ((!(*(p+i)>=48&&*(p+i)<=57))&&(*(p+i+1)>=48&&*(p+i+1)<=57))
			printf("\n");
	}
	return 0;
}
main()
{
      char s[30],num[30];
      gets(s);
      int l;
      l=strlen(s);
      int k=0;
      for (int i=0;i<l;i++)
      {
          if (s[i]>='0'&&s[i]<='9')
          {
              num[k]=s[i];
              k++;
          }
          else
          {
              if (k!=0)
              {
                       for (int j=0;j<k;j++)
                          printf("%c",num[j]);
                       printf("\n");
                       k=0;
              }
              else k=0;
          }
      }
      if (k!=0)
      {
         for (int j=0;j<k;j++)
            printf("%c",num[j]);
         printf("\n");
      }
      getchar();
      getchar();
}
int main()
{
	char str[30];
         gets(str);
	char *p;
	p=str;
	int num=0;
	for(;*p!='\0';p++){
		if(*p>='0'&&*p<='9'){
			num=num*10+(*p-'0');
			p++;
			if(!(*p>='0'&&*p<='9')||*p=='\0'){
				cout<<num<<endl;
				num=0;
			}
			p--;
		}
	}
	return 0;
}
int main()
{
 char a[30],*q;
 gets(a);
 int i,j,u;
 q=a;
  for(i=0;i<strlen(a);i++)
  { if((*(q+i)=='0')||(*(q+i)=='1')||(*(q+i)=='2')||(*(q+i)=='3')||(*(q+i)=='4')||(*(q+i)=='5')||(*(q+i)=='6')||(*(q+i)=='7')||(*(q+i)=='8')||(*(q+i)=='9'))
   cout<<*(q+i);
   if((*(q+i)!='0')&&(*(q+i)!='1')&&(*(q+i)!='2')&&(*(q+i)!='3')&&(*(q+i)!='4')&&(*(q+i)!='5')&&(*(q+i)!='6')&&(*(q+i)!='7')&&(*(q+i)!='8')&&(*(q+i)!='9'))
     
      if(i!=0)
      {if((*(q+i-1)=='0')||(*(q+i-1)=='1')||(*(q+i-1)=='2')||(*(q+i-1)=='3')||(*(q+i-1)=='4')||(*(q+i-1)=='5')||(*(q+i-1)=='6')||(*(q+i-1)=='7')||(*(q+i-1)=='8')||(*(q+i-1)=='9'))
       cout<<endl;}}
       
      
 
return 0;
}