semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//*******************************************************************
//* ????????			  									*
//* ????????????????								*
//*??? ???													*
//*???2010?12?8?												*
//*******************************************************************
int main()
{
	char str[31];                   //????????
	cin.getline (str, 31);
	char * p = str;                //??????????
	int i = 0;
	while (p < str + strlen(str))
	{
		if (*p >='0' && *p <= '9')       //??????????
			cout << * p;
		if ( *p >= '0' && *p <= '9' && !(*(p + 1) >='0' && *(p + 1) <= '9'))
			cout << endl;//??????????????????????
		p ++;
	}
	return 0;
}
int main()
{
	char s[40];
	gets(s);
	char *p=s;
	int sum=0,sign,i,j,k;
	for(i=0;i<strlen(s);)
	{
		sign=0;
		if(p[i]=='0'&&i+1<strlen(s)&&(p[i+1]>='0'&&p[i+1]<='9')&&!sign)
		{
			i++;
			continue;
		}
		if(p[i]>='0'&&p[i]<='9')
		while(p[i]>='0'&&p[i]<='9'&&i<strlen(s))
		{
			cout<<p[i];
			i++;
		}
		else
		{
			i++;
			continue;
		}
		cout<<endl;
	}
	//while(1);
	return 0;
}
char c[30];
void main()
{
	char *p;
	p=c;
	gets(c);
    while(*p!='\0')
	{
		while(*p<'0'||*p>'9')
		{p+=1;if(*p=='\0')break;}
		printf("%c",*p);
		p+=1;
		if(*p<'0'||*p>'9')printf("\n");
	}
}
int main()
{
    char s[1000];
    int i,l;
    gets(s);
    l=strlen(s);
    for (i=0;i<l-1;i++)
    {
        if (isdigit(s[i]))
        printf("%c",s[i]);
        if (isdigit(s[i])&&isdigit(s[i+1])==0)
        printf("\n");
    }
    if (isdigit(s[l-1]))
    printf("%c",s[l-1]);
    return 0;
}
int main()
{
	int a,b,i,j,c,d=0,e,f,g;
	char *str,ch[30];
	str=ch;
	gets(str);
	a=strlen(str);
	for(i=0;i<a;i++)
	{
		if(*(str+i)>='0' && *(str+i)<='9') printf("%c",*(str+i));
		else if(*(str+i-1)<'0' || *(str+i-1)> '9'|| i==0) continue;
		else{ printf("\n");d++;}
	}
	return 0;
}
void num(char*p){
	if(*p==0)return;
	if((*p>='0')&&(*p<='9'))
	{
		for(;(*p>='0')&&(*p<='9')&&(*p!=0);p++)
			cout<<*p;
		cout<<endl;
		num(p);
	}
	else num(p+1);
}
int main (){
	char c[31];
	cin.getline(c,31);
	num(c);
}
int pd(char *m)
{
	if(*m>='0'&&*m<='9') return(1);
	else return (0);
}
void main()
{
	char *p,*a;
	p=(char*)malloc(1000*sizeof(char));
	gets(p);
	for(a=p;*a!='\0';a++)
	{
       if(pd(a)) printf("%c",*a);
	   else if(pd(a-1)&&(pd(a)!=1))
		   printf("\n");
	   }
}
/*
 * 1000012795-????.cpp
 *
 *  Created on: 2010-12-29
 *      Author: Administrator
 */
int main()
{
	char str[31];
	char a[31];
	int len,i,j=0,num=0,sum=0;
	cin.getline(str,31);
	len=strlen(str);
	for(i=0;i<len;i++)
	{
		if(str[i]>='0'&&str[i]<='9')
		{
			a[j]=str[i];
			num=num+1;
			j=j+1;
		}
		if(str[i]<'0'||str[i]>'9')
		{
			for(j=0;j<num;j++)
			{
				if(a[j]!='0')
					break;
				sum=sum+1;
			}
			if(sum==num&&sum!=0)
			{
				cout<<"0"<<endl;
				num=0;
				sum=0;
			}
			else
			{
			for(j=sum;j<num-1;j++)
				cout<<a[j];
			cout<<a[num-1]<<endl;
			j=0;
			num=0;
			sum=0;
			}
		}
	}
	for(j=0;j<num;j++)
	{
		if(a[j]!='0')
			break;
		sum=sum+1;
	}
	if(sum==num&&sum!=0)
	    cout<<"0"<<endl;
	else
	{
	   for(j=sum;j<num-1;j++)
			cout<<a[j];
		cout<<a[num-1]<<endl;
	}
	return 0;
}
int main()
{
	int a=0,i,j,k,l;
	char *p=NULL;
	char b[50];
	p=b;
	cin.get(b,50);
	l=strlen(b);
	for(i=0;i<l;i++)
	{
		if(*(p+i)>'0'&&*(p+i)<='9')
		{
			cout<<*(p+i);
			a=1;
		}
		if((*(p+i)<'0'||*(p+i)>'9')&&a==1)
		{
			cout<<endl;
			a=0;
		}
		if(*(p+i)=='0')
		{
			if(a==1)
				{cout<<*(p+i);}
			else
			{
				if(a==0&&(*(p+i+1)<'0'||*(p+i+1)>'9'))
				{cout<<*(p+i);a=1;}
			}
		}
	}
}
int main()
{
char c[30];
int i;

		for(i=0;i<30;i++)
		{scanf("%c",&c[i]);
		switch(c[i])
		{
		case '1':
		case '2':
	    case '3':
	    case '4':
	    case '5':
        case '6':
	    case '7':
		case '8':
         case '9':
	     case '0':
				printf("%c",c[i]);break;
				default :
					{switch(c[i-1])
			       {
		       case '1':
		        case '2':
               case '3':
	            case '4':
				case '5':
				case '6':
				case '7':
				case '8':
		          case '9':
			     case '0':
				printf("\n");break;
				   }
					}
			}}
	return 0;
		}
int main()
{
	int n,i,t=1;
	char *p;
	p=(char*)malloc(1000*sizeof(char));
	gets(p);
	n=strlen(p);
	for(i=0;i<n;i++)
	{
		if((*(p+i)>='0')&&(*(p+i)<='9'))
		{
			printf("%c",*(p+i));
			t=0;
		}
	    else if(t==0)
		{
			printf("\n");
			t++;
		}
	}
}
//????
//1000062701
//???

int main()
{
	char str[31];
	cin.getline( str, 31 );
	char *p = str;                           //???????
	int flag = 0;
	for( int i = 0; str[i]!= '\0'; i++ )
	{
		if( ( ( *( p + i ) - '0' ) >= 0 ) && ( ( *( p + i ) - '0' ) <= 9 ) )
		{
			flag = 0;
			cout << *( p + i );
		}
		else if( flag == 0 )
		{
			cout << endl;
			flag = 1;
		}
	}
	cout << endl;
	return 0;
}
main()
{  char *s,*c;
   int i,j;
   s=(char *)calloc(31,sizeof(char));
   gets(s);
   for(i=0;*(s+i)!='\0';i++)
   {
    if(*(s+i)<='9'&&*(s+i)>='0')printf("%c",*(s+i));
     else
      { for(;(*(s+i)<'0'||*(s+i)>'9')&&*(s+i)!='\0';i++);

      if(*(s+i)!='\0')printf("\n");
      i--;
      }
   }

}
int main()
{
	char a[31];
	int i,len;
	cin.getline(a,31);
	len=strlen(a);
	for(i=0;i<len;i++){
		if(a[i]>=48&&a[i]<=57){
			cout<<a[i];
			if(a[i+1]<48||a[i+1]>57){
				cout<<endl;
			}
		}
	}
	return 0;
}
int main()
{
    int l,i,j,k;
    char str[31];
    gets(str);
    l=strlen(str);
    if(str[0]-'0'>=0&&str[0]-'0'<=9)
        {
            printf("%c",str[0]);
            for(k=1;;k++)
            {
              if(str[k]-'0'>=0&&str[k]-'0'<=9)
              printf("%c",str[k]);
              else
              break;
            }
            printf("\n");
        }
    for(i=0;i<l-1;i++)
    {
        if((str[i]-'0'>9||str[i]<'0')&&str[i+1]-'0'<=9&&str[i+1]-'0'>=0)
        {
           for(j=i+1;;j++)
           {
              if(str[j]-'0'<=9&&str[j]-'0'>=0) 
              printf("%c",str[j]);
              else if(str[j]==' ')
              break;
              else
              break;
           }
           printf("\n");
        }
    }
    getchar();
    getchar();
}
int main()
{
	char c[31]={0};
	char *p=c;
	cin.getline(c,31);
	for(p=c;p<c+strlen(c);p++)
	{
		if(*p=='0')               //0???
			cout<<0<<endl;
		else if(*p>'0'&&*p<='9')  //??????
		{
			cout<<atoi(p)<<endl;
			while(*(p+1)>='0'&&*(p+1)<='9')
				p++;   //??????
		}
	}
	return 0;
}
/*
 * pickup.cpp
 *   Author: ???
 *  Created on: 2012-12-13
 *  ???  ?????????
 *
 */
int main(){
	char a[32],*p=NULL;//???????
	int n=0,i;//????
	gets(a);
	p=a;
	for(;*p!='\0';p++){//????????
		if(isdigit(*p)&&*(p+1)!='\0')//??????????????????????
			n++;//??
		else{//??
			for(i=n-1;i>=0;i--)//????
				cout<<*(p-i-1);
			if(*(p+1)=='\0'&&isdigit(*p))//???????????????
				cout<<*(p);
			if(n!=0)
				cout<<endl;//??
			n=0;//??
		}
	}
	return 0;
}
int main()
{
	char *p,*q;
	int a=0;
	p=(char*)malloc(30*sizeof(char));
	q=p;
	gets(p);
	while(*q!='\0')
	{
		if(*q<='9'&&*q>='0')
		{
			printf("%c",*q);
			a=0;
		}
		if((*q>'9'||*q<'0')&&a==0)
		{
			printf("\n");
			a++;
		}
		q++;
	}
}
int main()
{
   char a[35];
   int count=0;
   char *p=a;
   cin.getline(a,35);
   for(;*p!='\0';*p++){
	   if(*p>=48&&*p<=57){
		   cout<<*p;
		   *p++;
		  for(;*p!='\0';*p++){
			  if(*p>=48&&*p<=57)
				  cout<<*p;
			  else {cout<<endl;break;}
		  }
	   }
	   else continue;
   }
   //while(1);
	return 0;
}
int main()
{
	char *p1,*p2,*p3;
	p1=(char*)malloc(120);
	gets(p1);
	for(p2=p1;*p2;p2++)
	{
		if((*p2)>='0'&&(*p2)<='9') //??????0~9???
		{
			for(p3=p2;(int)(*p3)-'0'>=0&&(int)(*p3)-'0'<=9;p3++)//??????????
			printf("%c",*p3);
			printf("\n");
			p2=p3;//???????
			p2--;
		}
	}
}
int main()
{
    int n,i,j,m,sign1,sign2;
    char s[30];
    gets(s);
    m=strlen(s);
    sign1=0;sign2=0;
    for(i=0;i<m;i++)
    {
      if(s[i]>='0'&&s[i]<='9')
      printf("%c",s[i]);
      else if(s[i]<'0'||s[i]>'9')
        if(s[i-1]>='0'&&s[i-1]<='9')
        printf("\n");
                   
      
    }
      return 0;
}
int main()
{
	char a[31];  
	char *p=a;                                                    //?????????a???
	cin.getline(a,31);
	for(;*p!='\0';p++)
	{
		if(*p>='0'&&*p<='9'&&*(p+1)>='0'&&*(p+1)<='9')               //????????????????????
		   cout<<*p;
		else if(*p>='0'&&*p<='9'&&(*(p+1)<'0'||*(p+1)>'9'))          //??????????????????????????
		   cout<<*p<<endl;  
		else                                                         //?????????????
		   continue;
	}
	return 0;
}
int main() {
	char a[31];
	cin.getline(a,31);
	int i=-1,len=strlen(a);
	while(i<len){
		i++;
		if(a[i]>'9'||a[i]<'0')continue;//??????????
		while(a[i]<='9'&&a[i]>='0'){   //????????????????????
			cout<<a[i];i++;
		}
		cout<<endl;
	}
         cout<<endl;
	return 0;
}
int main()
{
	char c[30];
	char *p=NULL;
	cin.getline(c,31);
	for(p=c;p<=c+strlen(c)-1;++p)
	{
		if(*p>='0'&&*p<='9'&&*(p+1)>='0'&&*(p+1)<='9')
			cout<<*p;
		if(*p>='0'&&*p<='9'&&(*(p+1)<'0'||*(p+1)>'9'))
			cout<<*p<<endl;
	}
	return 0;
}
void main()
{
    int i,j;
    char a[30],b[30];
    gets(a);
    for(i=0;a[i]!='\0';i++)
    if(a[i]>47&&a[i]<58)
    {memset(b,0,20);
    	for(j=0;a[i]>47&&a[i]<58;i++,j++)
    	b[j]=a[i];
        puts(b);

    }
}
int main()
{
	char str[100];
	gets(str);
	int i,flag;
	for(i=0;str[i]!='\0';i++)
	{
		if((int)str[i]<58&&(int)str[i]>47)
		{
			cout<<str[i];
			flag=1;
		}
		else if(flag==1)
		{
			cout<<endl;
			flag=0;
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	int i=0,j,s,m;   //?????????
	char c[31];      //??????c
	cin.getline(c,31);   //??????
	m=strlen(c);
	for(i=0;i<m;i++)
	{
		if(c[i]>='0'&&c[i]<='9')    //??????????
		{
			for(j=i;j<m;j++)
			{
				if(j+1<=m&&(c[j]>='0'&&c[j]<='9')&&(c[j+1]<'0'||c[j+1]>'9')) //???????????????????
				{
					for(s=i;s<=j;s++)
						cout<<c[s];
					cout<<endl;
					i=j+1;
					break;
				}
				if(j==m&&(c[j]>='0'&&c[j]<='9'))  //???????????
				{
					for(s=i;s<=j;s++)
						cout<<c[s];
					cout<<endl;
					i=m;
					break;
				}

			}
		}
	}
	return 0;
}
/*????  ??*/
int main()
{
	char a[30];
	int i;
	cin.getline(a,31);
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]-'0'>=0 && a[i]-'0'<10)
			cout<<a[i];
		else if(a[i+1]-'0'>=0 && a[i+1]-'0'<10)
			cout<<endl;
	}
	return 0;
}
//?? - ??(12-4) ????
int main(void)
{
    char str[MAX], dig[MAX];
    int n, i, t=0, ok=0, j, k=0, a[MAX];
    memset(a, 0, sizeof(a));
    memset(dig,0,sizeof(dig));
    gets(str);
    n = strlen(str);
    for(i=0; i<n; i++)
    {
        if(isdigit(str[i])&&ok)
        {
            for(j=0; j<t-1; j++)
            {
                a[k]+=((int)dig[j]-'0');
                a[k]*=10;
            }
            a[k]+=dig[t-1]-'0';
            k++;
            t=0;
        }
        if(isdigit(str[i]))
        {
            dig[t++]=str[i];

            ok=0;
        }
        if((!ok)&&(!isdigit(str[i])))
            ok=1;
    }

    for(j=0; j<t-1; j++)
    {
        a[k]+=(dig[j]-'0');
        a[k]*=10;

    }
    a[k]+=dig[t-1]-'0';

    for(i=0; i<=k; i++)
    {
        if(a[i]>=0)
            printf("%d\n",a[i]);
    }

    return ;
}
int main()
{
char *p;
int i;
p=(char *)malloc(30*sizeof(char));
gets(p);
for(i=0;*(p+i)!='\0';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(int argc, char* argv[])
{
	char sz[30]={' '};				//???????30?????????????????????????????????
	int i=0,j=0;					//?????????????j?
	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'))&&((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("%c",sz[i]);		//??sz[i]??????sz[i+1]?????????sz[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'))&&(!((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("%c\n",sz[i]);	//??sz[i]??????sz[i+1]?????????sz[i]?????????????
	}
	return 0;
}
int main()
{
	char c[35],*p=c;
	gets(c);
	for(;*p!='\0';p++)
	{
		if(*p<='9'&&*p>='0')
			cout<<*p;
		else {
			if(*(p+1)<='9'&&*(p+1)>='0')
				cout<<endl;
			else continue;
		}
	}
	
	return 0;
}
int number(char a);
int main()
{
	char c[30];
	int i,len,n;
	gets(c);
	len=strlen(c);
	n=0;
	while(number(c[n])==0){
	n++;
	}
	if(n==len-1)
		printf("%c",c[len-1]);
	if(n==len-2&&number(c[len-1])==1)
		printf("%c%c",c[len-2],c[len-1]);
	if(n==len-2&&number(c[len-1])==0)
		printf("%c",c[len-2]);
	if(n<len-2){
	printf("%c",c[n]);
	for(i=n+1;i<len;i++){
	if(number(c[i-1])==1&&number(c[i])==1)
		printf("%c",c[i]);
	if(number(c[i-1])==0&&number(c[i])==1)
		printf("\n%c",c[i]);
	}
	}
	return 0;
}
int number(char a){
	int m;
	if(a>='0'&&a<='9'){
	m=1;
	}else{
	m=0;
	}
	return m;
}
int main()
{
 char a[100];
 cin.get(a,33);
 int i=0;
 for(i=0;i<31;i=i+1)
   {    
     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(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')
           {cout<<a[i];}
           else 
           {cout<<a[i]<<"\n";}
        }
   }  
return 0;
}
main()
{
    char a[30];
    gets(a);
    int i;
    for(i=0;i<strlen(a);i++)
    {
         if(a[i]<='9'&&a[i]>='0')
         putchar(a[i]);
         else if(a[i-1]<='9'&&a[i-1]>='0')
         printf("\n");
    }
}
char a[35];
int main()
{
	gets(a);
	for(int i=0;i<strlen(a);i++){
		if(isdigit(a[i])!=0){
			if(isdigit(a[i+1])!=0)
				cout<<a[i];
			else
				cout<<a[i]<<endl;
		}
	}
	
	
}
int main()
{
	char str[31];
	char *p=str;
	cin.getline(str,31);
	for(int i=0;i<strlen(str);i++)
	{
		if(*p>=48&&*p<=57)
		{
			cout<<*p;
			if(*(p+1)<48||*(p+1)>57)
			{
				cout<<endl;
			}
		}
		p++;
	}
	return 0;
}
int main()
{
   char a[50];
   cin.getline(a,50);
   int i,j,k,l;
   l=strlen(a);
   for(i=0;i<l;i++)
   {
     if((a[i]>47)&&(a[i]<58))
     {
       cout << a[i];
     }
     else if((a[i-1]>47)&&(a[i-1]<58))
     {
          cout << endl;
     }
   }
   cin.get();cin.get();cin.get();
   return 0;
}
void f(char *p)
{
     int i;
     for (i=0;i<=29;i++)
     {
     if ((*p)>='0'&&(*p)<='9')
     printf("%c",*p);
     else if (*(p+1)>='0'&&*(p+1)<='9')
     printf("\n");
     p++;
     }
}




int main(int argc, char *argv[])
{
  char a[30];
  gets(a);
  char *p;
  p=a;
  f(p);	
  return 0;
}
main()
{
  int i;
  char *p;
  p=(char*)malloc(30*sizeof(char));
  gets(p);
  for(i=0;i<30;i++)
  {
    if(*(p+i)>=48&&*(p+i)<=57)
      printf("%c",*(p+i));
    else
    {
      if(*(p+i-1)>=48&&*(p+i-1)<=57)
      printf("\n");
    }
  }
}
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");
					p=p2-1;
					break;
				}
		}
}
/*
 * gd.cpp
 *
 *  Created on: 2010-12-31
 *      Author: 10058
 */

int main()
{
	char c[50];
	cin.getline(c,50);
	int i=0;
	while(c[i]!='\0')
	{
		if(c[i]>='0'&&c[i]<='9')
		{
			cout<<c[i];
		}
		else
		{

			if(i!=0&&c[i-1]>='0'&&c[i-1]<='9')
			{
				cout<<endl;
			}
		}
		i++;
	}
	return 0;
}
void main()
{
	int i;
	char *a;
    a=(char *)malloc(30);
	gets(a);
	if(*a>='0'&&*a<='9')
		printf("%c",*a);
	for(i=1;*(a+i)!='\0';i++)
	{
		if(*(a+i)>='0'&&*(a+i)<='9')
			printf("%c",*(a+i));
		else if((*(a+i)<'0'||*(a+i)>'9')&&*(a+i-1)>='0'&&*(a+i-1)<='9')
			printf("\n");
	}
}
/**
* @file		????.cpp
* @author	??	1000012792
* @date		2010.12.9
*/
int main()
{
	char s[40];
	int i, flag = 0, l;				//flag?????????
	cin.getline(s,40);				//??????????s
	l = strlen(s);					//l??s???
	for(i=0;i<l;i++)
	{
		if(s[i]<='9'&&s[i]>='0')	//????????
		{
			cout << s[i];			//?????????flag??1
			flag = 1;
		}
		else
		{
			if(flag==1)				//????flag==1,?????????????????????????flag????0
			{
				cout << endl;
				flag = 0;
			}
		}
	}
	return 0;
}
int main()
{
    char a[31]={0};
    int i=0;
    cin.getline(a,31);
    for(i=0;a[i]!=0;i++)
    if(a[i]>='0'&&a[i]<='9')
    {
                            cout<<a[i];
                            if(a[i+1]<'0'||a[i+1]>'9')cout<<endl;
    }
    getchar();getchar();
    return 0;
}
int main()
{
	char c[40];
	int i=0,flag=1;
	gets(c);
	while(c[i]!='\0')
	{
		if(c[i]>=48&&c[i]<=57)
		{
			printf("%c",c[i]);
		    flag=0;
		}
		else if(flag==0)
		{
			printf("\n");
			flag=1;
		}
		i++;
	}

	return 0;
}
int main() {
	char buf[32];
	gets(buf);
	int offset = 0;
	char c;
	while (offset < strlen(buf)) {
		c = *(buf+offset);
		if ('0' <= c && c <= '9') {
			cout << c;
		} else {
			cout << endl;
		}
		++offset;
	}
	return 0;
}
int main()
{
    char ch[50] ;
    cin.get( ch , 50 , '\n' ) ;
    int i = 0 ; 
    int n = strlen( ch ) ;
    for( i = 0 ; i <= n - 1 ; i ++ )
    {
         if( ( int )ch[i] >= 48 && ( int )ch[i] <= 57 )
         cout << ch[i] ;
         else
         if( i > 0 )
         if( ( int )ch[i - 1] >= 48 && ( int )ch[i - 1] <= 57 )
         cout << endl ;
    }
return 0 ;
}
int main()
{
char a[100],*p; 
gets(a);  //?????
p=a;
if(*p>=48&&*p<=57)
cout<<*p;
p++;
while(p-a<=strlen(a))
{
if(*p>=48&&*p<=57)  //???????????
	{
		cout<<*p;
	}
else if(*(p-1)>=48&&*(p-1)<=57)  //??????????
	{
		cout <<endl;
	}
	p++;
}
return 0;
}
int main()
{
	char *p1;
	int i,j;
	char c=' ';
	p1=(char *)malloc(30*sizeof(char));
	gets(p1);
	for (i=0;i<(strlen(p1));i++)
	{
		if (isdigit(*(p1+i)))
			printf("%c",*(p1+i));
		else if ((isdigit(*(p1+i))==0)&&(isdigit(*(p1+i-1))!=0))
			printf("\n");
	}
	return 0;
}
//???????
//???2010.12.13
//??????
//???1000012856

int main()
{
	char str[31], *p;				//str??????*p??
	gets(str);						//????????str
	int l = strlen(str);			//l??????
	p = str;						//*p?str???
	if(*p >= '0' && *p <= '9')		//??str????????????
		cout << *p;
	p = str +1;						//p??str?????
	while(p < str + l)
	{
		if(*p >= '0' && *p <= '9')	//????????????
			cout << *p;
		//???????????????????????????????????????
		else if(*(p - 1) >= '0' && *(p - 1) <= '9' && !(*p >= '0' && *p <= '9'))
			cout << endl;
		//????????????????
		p++;
	}
	cout << endl;

	return 0;
}
void main()
{
	int i,j;
	char a[30],s[30];
	gets(s);
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>47&&s[i]<58)
		{
			for(j=i;s[j]>47&&s[j]<58;j++) a[j-i]=s[j];
			a[j-i]='\0';
			i=j-1;
			if(strcmp(a,"111111111111")==0)printf("1");
			else printf("%s\n",a);
		}
		else
		{
			j=i;
			while((s[j]>58||s[j]<47)&&s[j]!='\0') j++;
			i=j-1;
		}
	}
}
/*
 *???: seek numbers.cpp
 *??????
 *????: 2012-12-10
 *??: ????
 */


int main ()
{
    char data[31],result[31][31];
    //result???????????,data????????
    int counter = 0;
    //counter??????
    cin.getline(data,31);
    for (int i = 0; i < strlen(data); i++)
        if(*(data+i) >= '0' && *(data+i) <= '9'){
            for (int j = 0; ; j++){
                *(*(result+counter)+j) = *(data+i+j);
                if (*(data+i+j+1) < '0' || *(data+i+j+1) > '9' || i+j == 29){
                    *(*(result+counter)+j+1) = '\0';
                    counter++;
                    i += j;
                    break;
                }
            }
        }
    for (int i = 0; i < counter; i++)
        cout << *(result+i) << endl;
    return 0;
}
void main()
{
	int n=0;
	char *p;
	p=(char *)malloc(sizeof(char)*31);
	gets(p);
	while(*p!='\0')
	{
		if(*p>='0'&&*p<='9')
		{
			if(n!=0)printf("\n%c",*p);
			else printf("%c",*p);
			n=0;
		}
		else n++;
		p++;
	}
}
int main()
{
    int b,j=0;
    char *p,*q;
    char a[30],c[30];
    gets(a);//???????? 
    b=strlen(a);//???? 
    p=a;
    q=c;
    for(int i=0;i<30;i++)//??????????? 
    *(q+i)=':';
    for(int i=0;i<b;i++)
    {
      if(isdigit(*(p+i))!=0)//????????? 
      {
        *(q+j)=*(p+i);
        j=j+1;
      }
      if((isdigit(*(p+i))!=0)&&(i==b-1))//?????????????????? 
      {
        for(int k=0;k<j;k++)
        cout<<*(q+k);
        cout<<endl;
      }
      if(i>0)
      {
        if((isdigit(*(p+i))==0)&&(isdigit(*(p+i-1))!=0))//??????????????? 
        {
          for(int k=0;k<j;k++)
          cout<<*(q+k);
          cout<<endl;
          j=0;//??????? 
          for(int k=0;k<30;k++)
          *(q+k)=':';
        }
      }
    }
    return 0;
}
//****************************************
//**???? ??? 1000010257
//**???? ????
//**???? ?????????????
//**?? 2010?12?8?
//****************************************


int main()
{
	char input[31] ;                   //???????
	char *p;
	int len , flag = 0 ;               //?????flag?????????????
	cin.getline( input , 31 );
	len = strlen( input );
	for( p = input ; p < input + len ; p++)
	{
		if( *p >= '0' && *p <= '9' )   //???????
		{
			cout<<*p;                  //???????
			flag = 1;
		}
		else
		{
			if( flag == 1)             //??????????????????
			{
				cout<<endl;
				flag = 0;              //????????
			}
			else if( flag == 0 )      //??????????????
			{
				continue;
			}
		}
	}
	return 0;
}
void main()
{
	char c[30];
	int i,n;
	gets(c);
	n=strlen(c);
	for (i=0;i<n;i++)
	{
		if(((c[i]>='0')&&(c[i]<='9'))&&((c[i+1]>='0')&&(c[i+1]<='9')))
			printf("%c",c[i]);
		else if (((c[i]>='0')&&(c[i]<='9'))&&((c[i+1]<'0')||(c[i+1]>'9')))
			printf("%c\n",c[i]);
	}
}
int main()
{
    int i,len=0;
    char str[32],temp[32];
    char *ptr;
    cin.getline(str,31);
    ptr=str;
    for(;*ptr!='\0';++ptr)
    {
        if(isdigit(*ptr)) len++;
        else
        {
            memset(temp,0,sizeof(temp));
            if(len==0) continue;
            for(i=0;i<len;++i) temp[len-i-1]=*(ptr-i-1);
            len=0;
            cout<<atoi(temp)<<endl;
        }
    }
    if(len)
    {
        for(i=0;i<len;++i) temp[len-i-1]=*(ptr-i-1);
        cout<<atoi(temp)<<endl;
    }
    return 0;
}
int main(){
	int i;
	char s[300];
	cin.getline(s,300);
	for(i=0;i<strlen(s);i++){
		if(s[i]>='0'&&s[i]<='9'){
			do{
				cout<<s[i];
				i++;
			}while(s[i]>='0'&&s[i]<='9');
			cout<<endl;
		}
	}
	return 0;
}
int main()
{
	char a[35];
	char *p;
	cin.getline(a,35);
	for(p=a;p<(a+strlen(a));p++)
	{if((48<=*p)&&(*p<=57)) cout<<*p;  
	else  
	{if((48<=*(p+1))&&(*(p+1)<=57)) cout<<endl;  
	else continue;
	}}
	return 0;
}
int main()
{
	char str[35];
	int i;
	gets(str);
	for(i=0;i<strlen(str);i++)
	{
		if(*(str+i)>='0'&&*(str+i)<='9')
		{
			cout<<*(str+i);
		}
		else
		{
			if(*(str+i+1)>='0'&&*(str+i+1)<='9')
			{
				cout<<endl;
			}
		}
	}
	if(*(str+strlen(str)-1)>='0'&&*(str+strlen(str)-1)<='9')
	{
		cout<<endl;
	}
	else
	{
		;
	}
	return 0;
}
int main()
{
	char a[1000];
	char *p;
	int len,i,j,st;
	p=a;
	gets(a);
	len=strlen(a);
	for(i=0;i<len;i++)
	{
		if((*(p+i)>=48)&&(*(p+i)<=57))
		{
			st=1;
		    printf("%c",*(p+i));
		}
		else
		{
			if(st==1)
			{
				printf("\n");
				st=0;
			}
			else
				st=0;
		}
	}



	return 0;
}
void main()
{
 char a[40];
 int i=0;
 gets(a);
 printf("\n");
 while(*(a+i)!='\0')
  {
    if(*(a+i)>='0'&&*(a+i)<='9') printf("%c",*(a+i));
    else if(*(a+i+1)>='0'&&*(a+i+1)<='9') printf("\n");
    i++;
   }
}
int main() {
    char data[31];
    int n,i;
    gets(data);
    for(n=0;data[n]!='\0';n++);
    for(i=0;i<n;i++) {
        if(data[i]<='9'&&data[i]>='0') {
            printf("%c",data[i]);
        } else {
            printf("\n");
        }
    }
    return 0;
}
/**
* ??????
* ???1000012847
* ???????
**/
int main()
{
	char str[100] , *p1;        //??????????????
	int a[100] = {0} , *p2;     //?????????????
	int flag = 0 , i = 0;       //??flag??1?????i?????0
      

	cin.getline(str , 100);     //?????

	for(p1 = str; *p1 != 0; p1++)  //?????????????
	{
		if(*p1 <= '9' && *p1 >= '0')   //???????
		{
			if(flag == 0)          //?????????????i???1???????1
			{
				i++;
				flag = 1;
			}
			a[i] = 10 * a[i] + (*p1 - '0');   //????????
		}
		else
			flag = 0;	           //??????????????0
	}

	for(p2 = a + 1; p2 <= a + i; p2++)
		cout << *p2 << endl;        //?????????????

	return 0;
}