semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
// ******************************
// *** ????.cpp           ***
// *** ID:1000012895          ***
// *** ???                 ***
// *** 2010/12/10             ***
// ******************************
int main()
{
	char str[31];
	cin.getline(str,31);
	char *p = NULL;
	p = str;
	while(*p != '\0')
	{
		if(*p <= '9' && *p >= '0')
		{
			cout << *p;
			if(*(p+1) > '9' || *(p+1) < '0')
				cout << endl;
		}
		p++;
	}
	return 0;
}
main()
{
      char a[30];
      gets(a);
      for(int i=0;a[i]!='\0';i++)
      {
              if(a[i]<='9'&&a[i]>='0'&&a[i+1]<='9'&&a[i+1]>='0')
                printf("%c",a[i]);
              else if(a[i]<='9'&&a[i]>='0'&&(a[i+1]<='9'&&a[i+1]>='0')==0)
                printf("%c\n",a[i]);
      }
}
int main(){
	char a[31];
	cin.getline(a,31);
	for(int i=0;i<strlen(a);i++)
		if (a[i]<='9'&& a[i]>='0')
			if (a[i+1]>'9'||a[i+1]<'0')
				cout<<a[i]<<endl;
			else cout<<a[i];
	return 0;
}
void main()
{
	char *str;int *a;
	str=(char*)malloc(30*sizeof(char));
	a=(int*)malloc(30*sizeof(int));

	gets(str);
	int i;
	for(i=0;i<strlen(str);i++) 
	{
		*(a+i)=*(str+i);
		
	}
			for(i=0;i<strlen(str);i++) 
	       if(*(a+i)>=48&&*(a+i)<=57)
		{
			
		printf("%c",*(str+i));
		
		if(1-(*(a+i+1)<=57&&*(a+i+1)>=48))
			printf("\n");
		}

}
int main()
{
     char *p,*q;
     p=(char*)malloc(30*sizeof(char));
     q=p;
     gets(q);
     for(q=p;*q!='\0';q++)
     {
                          if(*q>=48&&*q<=57)continue;
                          else *q='*';
                          }
     for(q=p;*q!='\0';q++)
     {
                          if(*q!='*')printf("%c",*q);
                          if(*q=='*'&&*(q+1)!='*')printf("\n");
     }
  
 
}
int main()
{ void prt(char a[],int n);
	int n=0;
  char a[31]={'\0'};
  gets(a);
  n=strlen(a);
  prt(a,n);
  getchar();
  getchar();
  return(0);
}
void prt(char a[],int n)
{ int i=0,t=0;
  for(i=0;i<n;i++)
  {  switch (a[i])
   { case '1':
    case '2':
    case '3':
	case '4':
	case '5':
	case '6':
	case '7':
	case '8':
	case '9':
	case '0':printf("%c",a[i]);t=0;break;
  default:
	  if(i<n-1)
	  {if(t==0) {t=1;printf("\n");}}
	  break;
   }
    
  }

}
int main()
{
  char str[50];
  cin.getline(str,40,'\n');
  int i,len;
  len=strlen(str);
  for(i=0;i<=len-1;i++)
  {
    if(str[i]>='0'  &&  str[i]<='9')
	{
		cout<<str[i];
	    if(i!=len-1)
		{
			if(str[i+1]<'0'  ||  str[i+1]>'9')
			cout<<endl;
		}
	}
  }

return 0;
}
/**
* @author ??
* @date 2010-12-8
* @description
* ??????:???? 
*/

int main()
{
	int flag = 1, count = 0;
	char str[31];
	cin.getline(str, 31);
	char *a = str;
	for (int i = 0; *(a + i) != '\0'; i++)
	{
		if (*(a + i) >= 48 && *(a + i) <= 57)
		{
			if (!flag)
				flag = 1;
			if (flag == 1)
				count ++;
			flag = 2;
			cout << *(a + i);
		}
		else
		{
			if (flag)
				cout << endl;
			flag = 0;
		}
	}
	cout <<endl;

	return 0;
}
void main(){
	char a[30];
	gets(a);
	char *pt[30];
	int i,j,l,s[30],m;
	l=strlen(a);
	j=0;
	i=0;
	if(a[0]<58&&a[0]>47) 
	{
		pt[0]=&a[0];
		j=1;
	}
	for(i=1;i<l;i++)
	{
		if(a[i]<58&&a[i]>47&&(a[i-1]>58||a[i-1]<47))
		{
			pt[j]=&a[i];
			j=j+1;
		}
		else
		{
			if(a[i-1]<58&&a[i-1]>47&&(a[i]>58||a[i]<47))
			{
				s[j-1]=(&a[i]-pt[j-1]);
			}
		}
	}
	if(a[l-1]<58&&a[l-1]>47) s[j-1]=(&a[l-1]-pt[j-1]+1);
	for(i=0;i<j;i++)
	{
		for(m=0;m<s[i];m++)
		{
			printf("%c",*(pt[i]+m));
		}
		printf("\n");
	}
	scanf("%d",&i);
}
int main()
{
    int i,len;
    char s[30]={'\0'};
     gets(s);
    len=strlen(s);
    for(i=0;i<len;i++)
   { if(s[i]>='0'&&s[i]<='9')
    printf("%d",s[i]-48);
     if((s[i]>='0'&&s[i]<='9')&&(s[i+1]=='\0'||s[i+1]<'0'||s[i+1]>'9'))
     printf("\n");}
     return 0;
}
void main()
{
	char str[300];int a[300];
	gets(str);
	int i;
	for(i=0;i<strlen(str);i++) 
	{
		a[i]=str[i];
		
	}
			for(i=0;i<strlen(str);i++) 
	       if(a[i]>=48&&a[i]<=57)
		{
			
		printf("%c",str[i]);
		
		if(1-(a[i+1]<=57&&a[i+1]>=48))
			printf("\n");
		}

}
void main()
{
 int i,j=0,k=0;
 char *p;
 p=(char *)malloc(30*sizeof(char));
 char (*q)[10];
 q=(char (*)[10])malloc(10*10*sizeof(char));
 char a[10][10];
 for(i=0;i<30;i++)
 scanf("%c",p+i);
 for(i=0;*(p+i)!='\0';i++)
 {
   if(*(p+i)>='0'&&*(p+i)<='9') {*(*(q+j)+k)=*(p+i);k++;}
   else 
       if(*(p+i+1)>='0'&&*(p+i+1)<='9')
       {
       *(*(q+j)+k)='\0';j++;k=0;
        }
  }
  *(*(q+j)+k)='\0';
  for(i=0;i<=j;i++)
 printf("%s\n",*(q+i));
}
char* getmemory(int num)
{
	char *p=(char*)malloc(num*sizeof(char));
	return p;
}

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

}
int main()
{
	char *org;
	org=(char*)malloc(30*sizeof(char));
	gets(org);
	int i,j,count;
	for(i=0;*(org+i)!='\0';i++)
	{
		if(*(org+i)>='0'&&*(org+i)<='9')
		{
			count=0;
			printf("%c",*(org+i));
		}
		else
		{
			if(i!=0&&count==0)printf("\n");
			count++;
		}
	}
}
int main()
{
	char a[30];
	int num[20] = {0}, i, j, flag;
	gets(a);
	for (i = 0, j = 0; a[i] != '\0'; i++)
	{
		if (a[i] >= '0' && a[i] <= '9')
		{
			num[j] = num[j] * 10 + (a[i] - '0');
			flag = 1;
		}
		else if (i > 0 && a[i - 1] >= '0' && a[i - 1] <= '9')
		{
			j++;
			flag = 0;
		}
	}
	for (i = 0; i < j; i++)
		cout << num[i] << endl;
	if (flag == 1)
		cout << num[j] << endl;
	return 0;
}
main()
{
char str[31]={0};
int i=0;

gets(str);

while(str[i])
{
if('0'<=str[i]&&str[i]<='9')
{
printf("%c",str[i]);
}
if(i>=1&&('0'<=str[i-1]&&str[i-1]<='9')&&!('0'<=str[i]&&str[i]<='9'))
{
printf("\n");
}
i++;
}



}
int main()
{
	char *p,*q,*r;
	char str[30];
	gets(str);
	for(p=str;*p!='\0';)
	{
		if(*p>='0'&&*p<='9'&&*(p-1)!='-')
		{
			q=p;
			while(*q>='0'&&*q<='9')
			{ q++;}
	        for(r=p;r<q;r++)
				cout<<*r;
			cout<<endl;
			p=q;
		}
		else p=p+1;
	}
	return 0;
}
/*
 * 04.cpp
 *
 *  Created on: 2014-1-4
 *      Author: Administrator
 */
int main()
{
	int i,k=0,s;
	char a[100];
	gets(a);
	s=strlen(a);
	for(i=0;i<s;i++)
	{
		if(a[i]-'0'>=0&&'9'-a[i]>=0)
		{
			cout<<a[i];
			k=1;
		}
		else
			if(k==1)
			{
				cout<<endl;
				k=0;
			}
	}
	return 0;
}
int main(int argc, char* argv[])
{
    char zifu[30];
    int i;

    gets(zifu);              /*?????*/

    for(i=0;i<strlen(zifu);i++){        /*?????????????*/
	if(zifu[i]>='0'&&zifu[i]<='9'){    /*????????'',??????
                                            ???????????0-9????*/
	    printf("%c",zifu[i]);
	}else{
	    if((zifu[i]<'0'||zifu[i]>'9')&&(zifu[i-1]>='0'&&zifu[i-1]<='9')){
		printf("\n");	/*????????*/
	    }
	}
    }
    return 0;

}
int main(){
	char s[31];
	int i,t=0;
	gets(s);
	for(i=0;s[i];i++){
		if(s[i]>='0'&&s[i]<='9'){
		  printf("%c",s[i]);
		  t=1;

		}else{
		  t=0;
		}
		if(t=1&&s[i+1]&&(s[i+1]<'0'||s[i+1]>'9')){
		  printf("\n");
		}

	}
   return 0;


}
int main()
{
	char a[31];
	int i;
	cin.getline(a, 31);
	for (i = 0; i <= strlen(a) - 1; i++)
	{
		if (*(a + i) >= '0' && *(a + i) <= '9')
			cout << *(a + i);
		else
		{
			cout << endl;
			while (*(a + i) < '0' || *(a + i) > '9')
				i++;
			i--;
		}
	}
	return 0;
}
int main()
{
     char c[31],*p=c;
     int a[31],*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+num;
                q=1+q;
           }
     }
     for(i=0,q=a; i<num; i++,q++)
     {
     cout<<*q<<endl;
     }
     return 0;
}
int main()
{
	char c;
	int flag = 0;
	c = cin.get();
	while (c != '\n')
	{
		if (c >= '0' && c <= '9')
		{
			if (flag == 0 && c == '0')
			{
				while (c != '0')
					c = cin.get();
			}
			cout << c;
			flag = 1;
		}
		else if (flag)
		{
			cout << endl;
			flag = 0;
		}
		c = cin.get();
	}
	return 0;
}
int main()
{
    char a[31],b[31];
    int j=0,n,x;
    gets(a);
    j=0;
    for(int i=0;a[i]!='\0';i++)
    {
        if(a[i]>='0'&&a[i]<='9')
        {
            b[j]=a[i];
            j++;
        }
        else
        {
            if(j==0)continue;
            b[j]='\0';
            printf("%s\n",b);
            j=0;
        }
    }
    b[j]='\0';
    printf("%s\n",b);
    return 0;
}
void main()
{
int i;
char *p;
p=(char*)malloc(1000*sizeof(int));
gets(p);
for(i=0;*(p+i)!='\0';i++)
{
if((*(p+i)>=48)&&(*(p+i)<=58)){printf("%d",*(p+i)-48);}
else{printf("\n");}
}
}
int main()
{
	char temp[31];
	char str[31];
	int k = 0, num = 0, k10;
	cin.getline(str, 31);
	for(int i = 0; i < sizeof(str); i++)
	{
		if(str[i] >= '0' && str[i] <= '9')
		{
			temp[k] = str[i];
			k++;
		}
		else 
			if(str[i-1] >= '0' && str[i-1] <= '9')
			{
				k10 = 1;
				for(int j = k - 1; j >= 0; j--)
				{
					num += (temp[j] - '0') * k10;
					k10 *= 10;
				}
				cout << num << endl;
				k = 0;
				num = 0;
			}
	}
	cin.get();
	cin.get();
	return 0;
}
// ???????.cpp : ??????????????
//??????-?-?????????~~o?n?

//#include "stdafx.h"

int main()
//int _tmain(int argc, _TCHAR* argv[])
{
	char a[100];
	//char *pa=&a[0];
	gets(a);
	int len=strlen(a),kk=0;//?kk????????????
	for (int i=0;i<len;i++)
	{
		if (a[i]>='0'&& a[i]<='9')//?????
			{				
				cout<<a[i];				
				kk=0;
			}
		else
			if (kk==0)//????????
			{
				kk++;
				cout<<endl;
			}
	}	
	return 0;
}
//****************************************************************
// ????1000012789_3.cpp                                      *
// ???wusy                                                    *
// ???12,8                                                    *
// ???????                                                *
//****************************************************************
int main()
{           
	int i;
	char a[31];
	cin.getline(a,31);

	for (i = 0; a[i] != '\0'; i++)
	{
		if (a[i] <= '9' && a[i] >= '0' && a[i + 1] <= '9' && a[i + 1] >= '0')
			cout << a[i];
		if (a[i] <= '9' && a[i] >= '0' && ( a[i + 1] > '9' || a[i + 1] < '0' ))
			cout << a[i] << endl;
	}
	return 0;
}
void main()
{ char*str,*p;int k=1;
  str=(char *)malloc(40*sizeof(char));
  gets(str);
  p=str;
  for (;*p!='\0';p++)
  { if (*p>='0'&&*p<='9')
    {printf("%c",*p);k=1;}
    else if(k=1) {printf("\n");k=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(){
    int c,state = 0;
    while((c = getchar())!=EOF){
    switch(state){
    case 0:
        if(isdigit(c)){
            putchar(c);
            state = 1;
        }
        break;
    case 1:
        if(!isdigit(c)){
            putchar('\n');
            state = 0;
        }
        else putchar(c);
        break;
    }
    }
    return 0;
}
int main()
{
	char c[31];
	char ch;
	int i,pd_num,pd_end;  
	//pd_num : ???????????
	//pd_end  : ????????????;

	for (i=0;i<31;i++)
		c[i] = 'A';          // ??????A

	gets(c);

	for (i=0;i<31;i++)              //????
	{
		pd_num = 0;
		for (ch='0';ch<='9';ch++)          // ???????????
			if (c[i]==ch)
				pd_num = 1;      

		if (pd_num)       // ??????????????
		{
			pd_end = 0;                      
			printf("%c",c[i]);
		}
		else              //????????????
		{
			if (pd_end==0)         //????????????
				printf("\n");
			pd_end = 1;
		}
	}
	return 0;
}
int main ()
{
	char a[33];
	int i ,n ;
	cin.getline(a,31);
	for(i=0;i<33;i++)    {
		if(a[i]=='\0') 
			{n=i;   break;}}
	for(i=0;i<n;i++)
	{
		if(((int)a[i])<58&&((int)a[i])>47)   cout<<a[i];
		else  cout<<endl;
	}
	return 0;
}
int main()
{
   char s[40];
   gets(s);
   int i;
   for(i=0;i<strlen(s);i++)
   {
	   if(isdigit(*(s+i))!=0)
	   {
		   cout<<*(s+i);
	   }
	   else
	   {
		   if(isdigit(*(s+i-1))!=0)
		   cout<<endl;
	   }

   }

   return 0;
}
int main(){
	int i,number=0;
	char string[31];
	cin.getline(string,50);
	for(i=0;string[i]!=0;i++){
		if(string[i]>='0'&&string[i]<='9')cout<<string[i];
		else if(i!=0)
			if(string[i-1]>='0'&&string[i-1]<='9'){
				cout<<endl;
				number++;
			}
	}
	number++;
	cout<<endl;
	return 0;
}
/*
 * extractnum.cpp
 *
 *  Created on: 2011/12/25
 *      Author: guyu
 */
char b[31];
float remembernum[31];
char num[31][31];
void modify(char a[],int len)//delete all the blanks
	{
		int i=0,j=0;
		for(i=0;i<len;i++)
			if(a[i]==' ')
			{
				for(j=i;j<len;j++)
					a[j]=a[j+1];
			}
	}
void converse(char a[],int len)
	{
		int i=0,j=0;
		for(i=0;i<len;i++)
		{
			if(a[i]>='0'&&a[i]<='9')
			{
				for(j=i;j<len;j++)
				{
					if(a[j]<'0'||a[j]>'9')
						{cout<<endl;break;}
					else
					{
						cout<<a[j];
					}
				}
				i=j;
			}
		}
	}
int main()
{
	char a[31];
	cin.getline(a,31);
	int len,len1;
	len=strlen(a);
	modify(a,len);
	len1=strlen(a);
	converse(a,len1);
	return 0;
}
int main() {
    int a;
    while (!cin.eof()) {
        while (!cin.eof() && !isdigit(cin.peek())) // not digit
            cin.get(); // ignore
        if (cin >> a) // digit, not eof
            cout << a << endl;
    }
    return 0;
}
int main()
{
	char a[200];
	int i , len , flag;
	cin.getline(a , 200);
	len = strlen(a);
	if (a[0] >= '0' && a[0] <= '9')
	{
		cout << a[0];
		flag = 1;
	}
	for (i = 1 ; i <= len - 1 ; i++)
	{
		if (flag == 1)
		{
			if (a[i] >= '0' && a[i] <= '9')
			{
				cout << a[i];
			}
			else
			{
				cout << endl;
				flag = 0;
			}
		}
		else
		{
			if (a[i] >= '0' && a[i] <= '9')
			{
				flag = 1;
				cout << a[i];
			}
		}
	}
	return 0;
}
int main()
{
	char c[30],*a;
	int i,d;
	gets(c);
	d=strlen(c);
	for(a=c+0;a<=c+d-1;a++)
		{
			if(isdigit(*a))
			printf("%c",*a);
			else if(!isdigit(*a)&&a>(c+0)&&isdigit(*(a-1)))
				printf("\n");
	}
	return 0;
}
int main()
{
	int i;
	char a[31];
	cin.getline(a,31);//????
	for(i=0;a[i]!='\0';i++)//?????????????????????????????
		if(a[i]>='0'&&a[i]<='9')cout<<a[i];
		else if(a[i-1]>='0'&&a[i-1]<='9')cout<<endl;
	return 0;
}
int judge(char x){
	if(x>47&&x<58){return 1;}
	return 0;}
int main (){
	int i,all,count,start[30],end[30],p;
	char sen[31];
	gets(sen);
	all=strlen(sen);
	count=0;
	for(i=0;i<all-1;i++){
		if(i==0){if(judge(sen[i])){start[0]=0;count++;}}
		if(i!=0&&(!(judge(sen[i-1])))&&judge(sen[i])){start[count]=i;count++;}
		if(judge(sen[i])&&(!judge(sen[i+1]))){end[count-1]=i;}}
	if(judge(sen[all-2])&&judge(sen[all-1])){end[count-1]++;}
	if((!judge(sen[all-2])&&judge(sen[all-1]))){start[count]=all-1;end[count]=all-1;count++;}
	if(end[count-1]<0||end[count-1]>30){end[count-1]=all-1;}
	for(i=0;i<count;i++){


		for(p=start[i];p<=end[i];p++){printf("%c",sen[p]);}


		printf("\n");}	


return 0;}
int main()
{
	char s[100];
	int i,t,l,flag;
	gets(s);
	l=strlen(s);
	flag=0;
	i=0;t=0;
	while(i<l)
	{
		if(s[i]=='-') 
		{
			flag=1;
			continue;
		}
		while(s[i]>='0' && s[i]<='9' && flag!=1)
		{
			t=1;
			printf("%c",s[i]);
			i++;
		}
		if(t==1)
		{t=0;printf("\n");continue;}
		if(flag==1 && (s[i]<'0' || s[i]>'9'))
		{flag=0;continue;}
		i++;	
	}
	return 0;
}
void main()
{
	void anaylse(char c[]);
	char c[31];
	gets(c);
	anaylse(c);
}
void anaylse(char c[])
{
	int i;
	for(i=0;i<31;i++)
	{
		if(*(c+i)>47&&*(c+i)<58&&*(c+i+1)>47&&*(c+i+1)<58)
			printf("%c",*(c+i));
		if(*(c+i)>47&&*(c+i)<58&&(*(c+i+1)<=47||*(c+i+1)>=58))
			printf("%c\n",*(c+i));
	}
}
void main()
{
	int l;
	char *a,*p;
	a=(char*)malloc(30*sizeof(int));
	gets(a);

	l=strlen(a);
	for(p=a;p<a+l;p++)
	{
		if((*p>=48)&&(*p<=57))
		{
			printf("%c",*p);
		}
		else
		{
			printf("\n");
		}
	}
	printf("\n");
}
int main()
{
    char a[31];
    int i,j,k,s,b[31];
    cin.getline(a,31);
    s=strlen(a);
   for(i=0;i<s;i++)
   {
       if(a[i]<'0'||a[i]>'9')
       {
           b[i]=1;
       }
       else b[i]=0;
   }

   for(i=0;i<s;i++)
   {
       if(b[i]==0)
       {
           for(j=i;j<s;j++)
           {
               if(b[j]==1)
               break;
           }
           for(k=i;k<j;k++)
                cout<<a[k];
           cout<<endl;
           i=j;
       }
   }
  return 0;
}
int main()
{
	char c[31];
	char num[30][10];
	int s=0;
	int i;
	char *p,*q;
	cin.getline(c,31);                         //??
	p=c;q=num[s];
	while(1)
	{
		if(*p=='\0')                           //??
		{
			*q='\0';
			s++;
			break;
		}
		if(*p-'0'<10&&*p-'0'>=0)               //???????
		{
			*q=*p; 
			p++;q++;
			continue;
		}
		if(*(p-1)-'0'<10&&*(p-1)-'0'>=0        //????????+1
			&&*p-'0'>=10||*p-'0'<0)
		{
			*q='\0';
			q=num[++s];
			p++;
			continue;
		}
		else p++;                               //????
	}
	for(i=0;i<s;i++)
		cout<<num[i]<<endl;
	return 0;
}
//??????????
//???
//2012-12-12
int main(){
	char a[40], *X;//?????????
	X=a;
	cin.getline(a,40);//?????? 
	int len,i,j=0,k;
	len=strlen(a);//???????
	for(i=0;i<len;i++){//??????????????
		if((*(X+i)<'0' || *(X+i)>'9') && *(X+i)!='-'){//???????????
			*(X+i)=' ';}
		if(*(X+i)=='-'){//????????????????
			*(X+i)=' ';
			for(j=i+1;j<len;j++){
				if(*(X+j)>='0' && *(X+j)<='9')
					*(X+j)=' ';
				else break;
			}
		}
	}
    int x=0,y=0;//????????
	for(i=0;i<len;i++){//??????????
		if(*(X+i)!=' '){
			cout << *(X+i);
			x=1;
			continue;}
		if(*(X+i)==' ' && x==1){//???????????????
			k=i;
			cout << endl;
			break;}
	}
	for(i=k+1;i<len;i++){
		if(a[i]!=' '){//????????
			cout << *(X+i);
			y=1;//???????????
		}
		if(a[i]==' ' && y==1){//?????????????y?0
			cout << endl;
			y=0;}
	}
	return 0;
}
int main()
{
	char x[100];
	char n[100];
	char *r, *w;
	r = w = NULL;
	cin.getline(x, 100, '\n');
	for(r = x;*r != '\0';r++)
	{
		if(*r <= '9' && *r >= '0')
		{
			w = n;
			for(;*r <= '9' && *r >= '0';r++)
			{
				*w = *r;
				w++;
			}
			*w = '\0';
			cout << n << endl;
		}
	}
	return 0;
}
int main()
{
    //char a[32];
    int i;
    char *p,*p1,*q;
    //gets(a);
    p1=p=(char *)malloc(32*sizeof(char));
    for(i=0;*(p+i-1)!='\n';i++)
    {
                             scanf("%c",(p+i));
    }
    //p=p1;
    for(q=(p+32);;q--)
    {
                      if(*q>47&&*q<58) break;
    }
    for(;*p!='\0';p++)
    { 
                      if(p<q)
                      {
                             if((*p>47&&*p<58)&&(*(p+1)>47&&*(p+1)<58))
                             {
                                                                printf("%c",*p);
                             }
                             if((*p>47&&*p<58)&&(*(p+1)<48||*(p+1)>57))
                             {
                                                                printf("%c\n",*p);
                             }
                      }
                      if(p==q)
                      {
                              printf("%c",*p);
                              break;
                      }
    }
    return 0;
}
int main(){
	int i,b=0;
	char a[30]={0};
	gets(a);
	for(i=0;i<30;i++){
		if(b==0&&a[i]<48&&a[i]>57){
			continue;
		}                                         //???????????????????b==0?????\n??continue
		else if(a[i]>=48&&a[i]<=57){
			printf("%c",a[i]);
			b=b+1;
		}                                         //??????ASCII??48?57????????????????b?1
		if(b>=1&&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("\n");
			b=0;
		}                                         //??????????????????b>=1?????
	}
	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];
    for(int i = 0; i < strlen(s); i++)
    {
        if(s[i] >= '0'&&s[i] <= '9')
        {
            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;
        }
    }

}
int main()
{
	char string[35];
	cin.getline(string,35);
	int i,lenth=strlen(string);
	for(i=0;i<lenth;i++)
	{
		if(string[i]>='0'&&string[i]<='9')
			if(string[i-1]!='-')
				for(;i<lenth;i++)
				{
					if(!(string[i]>='0'&&string[i]<='9'))
					{
						cout<<endl;
						break;
					}
					cout<<string[i];
				}
	}
	return 0;
}
int main(int argc, char* argv[])
{
	char a;
	int i;
	for(i=0;i<30;i++){
		scanf("%c",&a);
	
		
		if(a=='0'||a=='1'||a=='2'||a=='3'||a=='4'||a=='5'||a=='6'||a=='7'||a=='8'||a=='9')
			printf("%c",a);
		else 
			printf("\n");
	}

	return 0;
}
char p[30];
int l, i, j, t[30];//???t????????p?ascll?
int main() {
	cin.getline(p, 31);//????
	l = strlen(p);//l???
	for (i = 0; i < l; i++) {
		*(t + i) = *(p + i);
		if (*(t + i) < 58 && *(t + i) >= 48) {
			if (*(t + i - 1) != 45)
				*(t + i) = *(t + i) - 48;
		} //??????????
		else {
			*(t + i) = 32;
		}//??????????32
	}
	i = 0;//i???
	while (i < l) {
		if (*(t + i) != 32) {
			cout << *(t + i);
		}//??32?????
		else if (*(t + i) == 32) {
			cout << endl;//?32?????h??
			for (j = i; j < l; j++) {
				if (*(t + j) != 32) {
					i = j - 1;
					break;
				}//??????????????32?????
			}
		}
		i = i + 1;//????
	}
	return 0;
}//?????
int main()
{
	char c[50],*p=c;
	int a[50],*q=a,t=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');
			t++;
			q++;
		}
	}
	for(i=1,q=a;i<=t;i++,q++)
		printf("%d\n",*q);
	return 0;
}
void main()
{
	char c;
	int num=0;

	c=getchar();

	while(c!='\n'){
		if(c>='0'&&c<='9'){
			num=1;
			printf("%c",c);
		}
		else{
			if(num==1){
				putchar('\n');
				num=0;
			}
		}
		c=getchar();
	}
}
int main()
{
    char c[50];
    char *p = NULL; 
    cin.getline(c,50);
    for ( p = c; p < c + strlen(c); p++ )
    {
        if ( *p >= '0' && *p <= '9' )
        {
            cout << *p; 
            if ( p < c+strlen(c)-1 && *(p+1) >= '0' && *(p+1) <= '9' ) continue;
            cout << endl;
        }
    }
    
    return 0;
}
int main()
{
	char zfc[100];
	gets(zfc);
	int i,k;
	for(i=0;zfc[i]!=0;i++)
	{
		if(zfc[i]>='0'&&zfc[i]<='9')
		{
			for(k=i;zfc[k]!=0;k++)
			{
				if(!(zfc[k+1]>='0'&&zfc[k+1]<='9'))
				{
					break;
				}
			}
		    for(i=i;i<=k;i++)
			{
			    printf("%c",zfc[i]);
			}
			printf("\n");
		}
	}
	return 0;
}
main(){
int i,j,k;
char a[31];
for(i=0;i<31;i++)
a[i]='\0';
gets(a);
k=strlen(a);
for(i=0;i<k;i++){
for(j=i;j<k;j++){
if(a[j]>='0'&&a[j]<='9'&&a[j-1]!='-'){
printf("%c",a[j]);
a[j]='*';
if(a[j+1]<'0'||a[j+1]>'9'){
printf("\n");
break;
}
}
}
}
}
int main()
{
	char s[30];
	gets(s);
	char *a;
	for(a=s;*a!='\0';a++)
	{
		if(*a>='0'&&*a<='9')
		{
			printf("%c",*a);
		}
		else
		{
			if(a==s)
			{
				continue;
			}
			else
			{
				if(*(a-1)>='0'&&*(a-1)<='9')
				{
					printf("\n");
				}
			}
		}
	}
	printf("\n");
	return 0;
}
//????
//by.???
//on.20101229

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