semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,a,b,c,d,e;
    scanf("%d",&n);
	a = n%10;
	b = ((n-a)%100)/10;
	c = ((n-10*b-a)%1000)/100;
	if(c==0){
		printf("%d%d",a,b);
	}
	else{
	     d = ((n-100*c-10*b-a)%10000)/1000;
	     if(d==0){
		      printf("%d%d%d",a,b,c);
		 }
		 else{
	          e = n/10000;
	          if(e==0)
		           printf("%d%d%d%d",a,b,c,d);
	          else
		           printf("%d%d%d%d%d",a,b,c,d,e);
		 }
	}
	return 0;
}
void main()
{
  int a1,a2,a3,a4,a5,m,n;
  scanf("%d",&m);
  a1=m%10;
  a2=(m%100)/10;
  a3=(m%1000)/100;
  a4=(m%10000)/1000;
  a5=(m%100000)/10000;
  if (a5!=0)
   { n=a1*10000+a2*1000+a3*100+a4*10+a5;}
  else
   {
     if(a4!=0){n=a1*1000+a2*100+a3*10+a4;}
     else
         {
           if(a3!=0){n=a1*100+a2*10+a3;}
           else
             {if (a2!=0){n=a1*10+a2;}
               else
                  {if(a1!=0){n=a1;}
                   else
                      n=0;
                   }
             }
          }
     }
     
  printf("%d",n);
}
int main()
{
	char ch,a,b,c,d,e;
	int n;
	n=0;
    while (scanf("%c",&ch)!=EOF)
	{
		n=n+1;

		switch(n)
		{
		case 1:a=ch;break;
		case 2:b=ch;break;
        case 3:c=ch;break;
		case 4:d=ch;break;
		case 5:e=ch;break;
		}
	}

	while (n>0)
	{
	
		switch(n)
		{
		case 5:printf("%c",e);break;
		case 4:printf("%c",d);break;
		case 3:printf("%c",c);break;
		case 2:printf("%c",b);break;
		case 1:printf("%c",a);break;
		}
			n=n-1;
	}
	return 0;
}
int main()
{
	int n, i = 1, a[5] = {-1,-1,-1,-1,-1}, m = 0;
	scanf("%d", &n);
    while (i < n)
	{
		a[m] = (int)((n%(i*10))/i);
		i *= 10;
		m++;
	}
	for (i=0;i<5;i++)
	{
		if (a[i] != -1)
			printf("%d", a[i]);
	}
	return 0;
}
void main()
{int a,b,c,d,e,f,g,h,i;

scanf("%d",&a);
if(a>9999)
{ b=a/10000;
   c=a%10000;
   d=c/1000;
   e=c%1000;
   f=e/100;
   g=e%100;
   h=g/10;
   i=g%10;
   printf("%d%d%d%d%d",i,h,f,d,b);}
else if(a>999)
{d=a/1000;
   e=a%1000;
   f=e/100;
   g=e%100;
   h=g/10;
   i=g%10;
   printf("%d%d%d%d",i,h,f,d);}
else if(a>99)
{ f=a/100;
   g=a%100;
   h=g/10;
   i=g%10;
   printf("%d%d%d",i,h,f);}
else if(a>9)
{h=a/10;
   i=a%10;
   printf("%d%d",i,h);}
else printf("%d",a);



	  
}
int main()
{
	int a;
	scanf("%d",&a);
	if(a<10) printf("%d",a);
	if(a>=10&&a<100){
		int b,c;
		b=a/10;
		c=a-10*b;
		printf("%d",10*c+b);
	}
	if(a>=100&&a<1000){
		int b,c,d;
		b=a/100;
		c=(a-100*b)/10;
		d=a-100*b-10*c;
		printf("%d",100*d+10*c+b);
	}
	if(a>=1000&&a<10000){
		int b,c,d,e;
		b=a/1000;
		c=(a-1000*b)/100;
		d=(a-1000*b-100*c)/10;
		e=a-1000*b-100*c-10*d;
		printf("%d",1000*e+100*d+10*c+b);
	}
	if(a>=10000&&a<100000){
		int b,c,d,e,f;
		b=a/10000;
		c=(a-10000*b)/1000;
		d=(a-10000*b-1000*c)/100;
		e=(a-10000*b-1000*c-100*d)/10;
		f=a-10000*b-1000*c-100*d-10*e;
		printf("%d",10000*f+1000*e+100*d+10*c+b);
	}
	return 0;
}
void main()
{	
	int x,a,b,c,d,e,y;
	scanf("%d",&x);
	a=x/10000;
	b=(x-10000*a)/1000;
	c=(x-10000*a-1000*b)/100;
	d=(x-10000*a-1000*b-100*c)/10;
	e=x%10;
	y=a+10*b+100*c+1000*d+10000*e;
loop:if((y%10)!=0)
		 printf("%d",y);
	 else
	 { 
		 y=y/10;
		 goto loop;
	 }
}
int main(int argc, char* argv[])
{
	int n,y=0;
	scanf("%d",&n);
	while(n>9)
	{
		y=y+n-n/10*10;
		n=n/10;
		y*=10;
	}
	y=y+n;
	printf("%d\n",y);
	return 0;
}
int main(int argc, char* argv[])
{//5
	int n,a,b,c,d,e,m;
	scanf("%d",&n);
	a=n/10000;
	if(a!=0)
	{
		b=(n-10000*a)/1000;
		c=(n-10000*a-1000*b)/100;
		d=(n-10000*a-1000*b-100*c)/10;
		e=n-10000*a-1000*b-100*c-10*d;
		m=e*10000+d*1000+c*100+b*10+a;
		printf("%d\n",m);
	}

	b=n/1000;
    if(a==0&&b!=0)
	{
		c=(n-1000*b)/100;
		d=(n-1000*b-100*c)/10;
		e=n-1000*b-100*c-10*d;
		m=e*1000+d*100+c*10+b;
		printf("%d\n",m);
	}
	else
    c=n/100;

	if(a==0&&b==0&&c!=0)
	{
		d=(n-100*c)/10;
		e=n-100*c-10*d;
		m=e*100+d*10+c;
		printf("%d\n",m);
	}
	
	else
	d=n/10;

	if(a==0&&b==0&&c==0&&d!=0)
	{
		e=n-10*d;
		m=e*10+d;
		printf("%d\n",m);
	}
    if(a==0&&b==0&&c==0&&d==0)
		printf("%d\n",n);
	return 0;
}
void main()
{	
    int n;
	scanf("%d",&n);
    void move(int n);
	move(n);
}
void move(int n)
{
	while(n!=0)
	{
	printf("%d",n%10);
	n=n/10;
	}
}
void main()
{
	int a,b,i,c,d,e,f;
	c=0;
	d=0;
	e=0;
	f=0;
	scanf("%d",&a);
	for(i=1;i<=10000;i=i*10)
	{
		b=(a%(10*i)-a%(i))/i;
		c=c+b*10000/i;
	}
	if((c%10)!=0)
		printf("%d",c);
	else
	{
		d=c/10;
	    if((d%10)!=0)
			printf("%d",d);
		else
		{
			e=d/10;
			if((e%10)!=0)
				printf("%d",e);
			else
			{
				f=e/10;
				if((f%10)!=0)
					printf("%d",f);
				else
				{
					printf("%d",f/10);
				}
			}
		}
	}
}
int main()
{
	char a[5],b[5];
	int i,j;
	gets(a);
	int length=(int)strlen(a);
	for(i=length-1,j=0;i>=0;i--,j++)
		b[j]=a[i];
	b[j]='\0';
	puts(b);
	return 0;
}
void main()
{
	int x,y;
	int a[5],i;
	int w=0;
	scanf("%d",&x);
	for(i=4;i>=0;i--)
	{
		a[i]=x%10;
		x=x/10;
	}
	for(i=0;a[i]==0;i++)
		w++;
	for(i=4;i>=w;i--)
		printf("%d",a[i]);
	printf("\n");
}
int main()
{
	int n,m;
	scanf("%d",&n);
	if(n/10000!=0) 
	{
		m=n/10000+(n-n/10000*10000)/1000*10+(n-n/1000*1000)/100*100+(n-n/100*100)/10*1000+(n-n/10*10)*10000;
	}
	if(n/10000==0&&n/1000!=0)
	{
		m=n/1000+(n-n/1000*1000)/100*10+(n-n/100*100)/10*100+(n-n/10*10)*1000;
	}
	if(n/10000==0&&n/1000==0&&n/100!=0)
	{
		m=n/100+(n-n/100*100)/10*10+(n-n/10*10)*100;
	}
	if(n/10000==0&&n/1000==0&&n/100==0&&n/10!=0)
	{
		m=n/10+(n-n/10*10)*10;
	}
	if(n/10000==0&&n/1000==0&&n/100==0&&n/10==0)
	{
		m=n;}  
	printf("%d",m);
	return 0;
}
int main(){
	int n,e;
	int sz[5];
    scanf("%d",&n);
	sz[1]=n/10000;
	sz[2]=(n-sz[1]*10000)/1000;
	sz[3]=(n-sz[1]*10000-sz[2]*1000)/100;
	sz[4]=(n-sz[1]*10000-sz[2]*1000-sz[3]*100)/10;
	sz[5]=n-sz[1]*10000-sz[2]*1000-sz[3]*100-sz[4]*10;
	if(sz[1]!=0){
		n=sz[5]*10000+sz[4]*1000+sz[3]*100+sz[2]*10+sz[1];
	}
	else if(sz[2]!=0){
		n=sz[5]*1000+sz[4]*100+sz[3]*10+sz[2]*1;
	}
	else if(sz[3]!=0){
		n=sz[5]*100+sz[4]*10+sz[3]*1;
	}
	else if(sz[2]!=0){
		n=sz[5]*10+sz[4]*1;
	}
	else n=n;
	printf("%d",n);
	return 0;
}
int main()
{
int a,b,c,s=0;
scanf("%d",&a);
c=a%10000;
b=a/10000;
s=s+b;


b=c/1000;
c=c%1000;


s=s+b*10;

b=c/100;
c=c%100;
s=s+b*100;

b=c/10;
c=c%10;

s=s+b*1000;

s=s+c*10000;

for(c=0;c<4;c++){
	if(s%10==0)
		s=s/10;}
printf("%d",s);
return 0;
}
int main()
{
    int i,a[10],b[10]; 
	for(i=0;i<4;i++)
		scanf("%d",&a[i]);
    for(i=0;i<4;i++)
    {
    b[i]=0; 
    while(a[i]>9)
	{ 
      b[i]=(b[i]+a[i]-a[i]/10*10)*10; 
      a[i]=a[i]/10; 
    } 
    b[i]=b[i]+a[i]; 
    printf("%d\n",b[i]);
	}
	return 0;
}
int main()
{
	int A,a,b,c,d,e;
	scanf("%d",&A);
	a=A/10000;
	b=(A-a*10000)/1000;
	c=(A-a*10000-b*1000)/100;
	d=(A-a*10000-b*1000-c*100)/10;
	e=A-a*10000-b*1000-c*100-d*10;
	if(a!=0)
		printf("%d%d%d%d%d",e,d,c,b,a);
	if(a==0&&b!=0)
		printf("%d%d%d%d",e,d,c,b);
	if(a==0&&b==0&&c!=0)
		printf("%d%d%d",e,d,c);
	if(a==0&&b==0&&c==0&&d!=0)
		printf("%d%d",e,d);
	if(a==0&&b==0&&c==0&&d==0&&e!=0)
		printf("%d",e);
	return 0;
}
void main()
{
	int num,a,b,c,d,e,n;
	int mun;

	scanf("%d",&num);

	a=num/10000;
	b=(num%10000)/1000;
	c=(num%1000)/100;
	d=(num%100)/10;
	e=num%10;

	if(a>0) n=1;
	else if(b>0) n=10;
	else if(c>0) n=100;
	else if(d>0) n=1000;
	else if(e>0) n=10000;
	else n=100000;

	mun=(a*1+b*10+c*100+d*1000+e*10000)/n;
	
	printf("%d\n",mun);
}
main()
{
	int a,b,c,d,e,f,g,h,n;
	scanf("%d",&n);
	a=n%10;
	b=n/10;
	c=b%10;
	d=b/10;
	e=d%10;
	f=d/10;
	g=f%10;
	h=f/10;
	switch((b>0)+(d>0)+(f>0)+(h>0))
	{
	case 0:
		printf("%d\n",a);
		break;
	case 1:
		printf("%d\n",a*10+c);
		break;
	case 2:
		printf("%d\n",a*100+c*10+e);
		break;
	case 3:
		printf("%d\n",a*1000+c*100+e*10+g);
		break;
	case 4:
		printf("%d\n",a*10000+c*1000+e*100+g*10+h);
	}
}
void main()
{
	int n,a,b,c,d,e,place;
	scanf("%d",&n);
	if (n>9999)
		place=5;
	else 
     if (n>999)
		place=4;
 else if (n>99)
		place=3;
else  if (n>9 )
		place=2;
else place=1;
a=n/10000;
b=(n-10000*a)/1000;
c=(n-10000*a-1000*b)/100;
d=(n-10000*a-1000*b-100*c)/10;
e=n%10;
switch (place)
{
case 1: printf("%d",e); break;
case 2: printf("%d%d",e,d); break;
case 3: printf("%d%d%d",e,d,c); break;
case 4: printf("%d%d%d%d",e,d,c,b); break;
case 5: printf("%d%d%d%d%d",e,d,c,b,a); break;
}
}
void main()
{
   long	int n,a,b,c,d,e,sum;
	scanf("%ld",&n);
	if (n/10==0) {a=n;printf("%ld",a);}
	else if(n/100==0) {a=n/10;b=n-a*10; sum=b*10+a;printf("%ld",sum);}
	else if(n/1000==0) {a=n/100;b=(n-a*100)/10;c=n-a*100-b*10;sum=100*c+10*b+a;printf("%ld",sum);}
	else if (n/10000==0) {a=n/1000;b=(n-a*1000)/100;c=(n-a*1000-b*100)/10;d=n-a*10000-b*100-c*10;sum=d*1000+c*100+b*10+a;printf("%ld",sum);}
	else if (n/100000==0) {a=n/10000;b=(n-a*10000)/1000;c=(n-a*10000-b*1000)/100;d=(n-a*10000-b*1000-c*100)/10;e=n-a*10000-b*1000-c*100-d*10;sum=e*10000+d*1000+c*100+b*10+a;printf("%ld",sum);}
	
	}
void main()
{
	int a,b,c,d,e,f,g,h,i,j;
	scanf("%d",&a);
	b=a%10;
	c=(a%100-b)/10;
	d=(a%1000-10*c-b)/100;
	e=(a%10000-100*d-10*c-b)/1000;
	f=(a%100000-1000*e-100*d-10*c-b)/10000;
	g=10000*b+1000*c+100*d+10*e+f;
	h=1000*b+100*c+10*d+e;
	i=100*b+10*c+d;
	j=10*b+c;
	if(a>10000)
	{printf("%d\n",g);}
	else if(a>1000)
	{printf("%d\n",h);}
	else if(a>100)
	{printf("%d\n",i);}
	else if(a>10)
	{printf("%d\n",j);}
	else
	{printf("%d\n",a);}
}
void main()
{
   int i=0,j;
   char a[5];
   while(1)
   {
	   scanf("%c",&a[i]);
	   if (a[i]=='\n') break;
	   i=i+1;
   }
   for(j=(i-1);j>=0;j--)
	   printf("%c",a[j]);

}
void main ()
{
	int n,s[5];
	scanf("%d",&n);
	if(n>=1&&n<=9)
		printf("%d\n",n);
		else if(n>=11&&n<=99)
	{
		s[0]=n/10;
	    s[1]=n-s[0]*10;
		printf("%d%d\n",s[1],s[0]);
	}
	else if(n>=111&&n<=999)
	{
		s[0]=n/100;
		s[1]=(n-s[0]*100)/10;
		s[2]=n-s[0]*100-s[1]*10;
		printf("%d%d%d\n",s[2],s[1],s[0]);
	}
	else if(n>=1111&&n<=9999)
	{
		s[0]=n/1000;
		s[1]=(n-s[0]*1000)/100;
		s[2]=(n-s[0]*1000-s[1]*100)/10;
		s[3]=n-s[0]*1000-s[1]*100-s[2]*10;
		printf("%d%d%d%d\n",s[3],s[2],s[1],s[0]);
	}
	else if(n>=11111&&n<=99999)
	{
		s[0]=n/10000;
		s[1]=(n-s[0]*10000)/1000;
		s[2]=(n-s[0]*10000-s[1]*1000)/100;
		s[3]=(n-s[0]*10000-s[1]*1000-s[2]*100)/10;
		s[4]=n-s[0]*10000-s[1]*1000-s[2]*100-s[3]*10;
		printf("%d%d%d%d%d\n",s[4],s[3],s[2],s[1],s[0]);
	}
}
int main()
{
	int a,b,c,d,e,f,g,h,i,j,k,l,m,o,p,n;
	scanf("%d",&n);
	if(n>=10000)
	{
		a=n/10000;
		b=(n-a*10000)/1000;
		c=(n-a*10000-b*1000)/100;
		d=(n-a*10000-b*1000-c*100)/10;
		e=n-a*10000-b*1000-c*100-d*10;
	    printf("%d%d%d%d%d",e,d,c,b,a);
	}
	else if(n>=1000&&n<=10000)
	{
		f=n/1000;
	    g=(n-f*1000)/100;
	    h=(n-f*1000-g*100)/10;
	    i=n-f*1000-g*100-h*10;
	    printf("%d%d%d%d",i,h,g,f);
	}
	else if(n>=100&&n<=1000)
	{
		j=n/100;
	    k=(n-j*100)/10;
	    l=n-j*100-k*10;
	    printf("%d%d%d",l,k,j);
	}
	else if(n>=10&&n<=100)
	{
		m=n/10;
	    o=n-m*10;
	    printf("%d%d",o,m);
	}
    else if(n>=0&&n<=10)
	{
		p=n;
	    printf("%d",n);
	}
}
int main()
{
	int n, x[5], i=0, j;
	scanf("%d", &n);
	while(n!=0)
	{
		x[i]=n%10;
		n=n/10;
		i++;
	}
	n=0;
	for(j=0;j<i;j++)
	{
		n+=x[j];
		n=n*10;
	}
	n=n/10;
	printf("%d\n", n);
	return 0;
}
void main()
{
int a,b,c,d,e,f,s;
scanf("%d",&a);
if(a<10) s=a;
else if(a<100) 
{
	b=a%10;
    c=(a-b)/10;
	s=b*10+c;
}
else if(a<1000)
{
	b=a%10;
    c=(a-b)/10%10;
	d=(a-b-c*10)/100;
	s=b*100+c*10+d;
}
else if(a<10000)
{
	b=a%10;
    c=(a-b)/10%10;
	d=(a-b-c*10)/100%10;
	e=(a-b-c*10-d*100)/1000;
	s=b*1000+c*100+d*10+e;
}
else if(a<100000)
{
	b=a%10;
    c=(a-b)/10%10;
	d=(a-b-c*10)/100%10;
	e=(a-b-c*10-d*100)/1000%10;
	f=(a-b-c*10-d*100-e*1000)/10000;
	s=b*10000+c*1000+d*100+e*10+f;
}
printf("%d\n",s);
}
void main()
{
	char a,b,c,d,e;
a=getchar();
b=getchar();
c=getchar();
d=getchar();
e=getchar();
if (e<='9' && e>='0' && e!=	EOF)
putchar(e);
if (d<='9' && d>='0' && d!=	EOF)
putchar(d);
if (c<='9' && c>='0' && c!=	EOF)
putchar(c);
if (b<='9' && b>='0' && b!=	EOF)
putchar(b);
if (a<='9' && a>='0' && a!=	EOF)
putchar(a);
}
int num,i,c;
int a[5];
void main()
{
 void move(int j,int k);
        scanf("%d",&num);
  if(num>=10000) {c=4;move(num,c);}
  else if(num>=1000&&num<10000) {c=3;move(num,c);}
  else if(num>=100&&num<1000) {c=2;move(num,c);}
  else if(num>=10&&num<100) {c=1;move(num,c);}
  else {c=0;move(num,c);}
 for(i=0;i<=c;i++)
  printf("%d",a[i]);
}
void move(int j,int k)
{
 if(k>0)
 {
 a[k]=(int)(j/(int)pow(10,k));
 int o=(int)(j%(int)pow(10,k));
    move(o,k-1);
 }
 else if(k==0)
 {a[k]=j;
 }
}
int main()
{
   int a,b,c,d,e,f,g;
   scanf("%d",&a);
   if(a>10000){
      b= a/10000;
      c= (a-10000*b)/1000;
      d= (a-10000*b-1000*c)/100;
      e= (a-10000*b-1000*c-100*d)/10;
      f= a%10;
      g= f*10000+e*1000+d*100+c*10+b;
      printf("%d",g);
          }
    else if(a>1000&&a<10000){
       b= a/1000;
       c= (a-1000*b)/100;
       d= (a-1000*b-100*c)/10;
       e= a%10;
       g= e*1000+d*100+c*10+b; 
       printf("%d",g);
          }
    else  if(a>100&&a<1000){
        b=a/100;
        c=(a-b*100)/10;
        d =a%10;
        g = d*100+10*c+b;
        printf("%d",g);
           }
      else if(a>10&&a<100)
          {
             b=a/10;
             c=a%10;
             g=c*10+b;
             printf("%d",g);
           }
      else if(a>1&&a<10)
           {
              g=a;
             
            printf("%d",g);
             }
  return 0;
}
void main()
{
	long int a;
	int b,c,d,e,f;
	scanf("%ld",&a);
	if(a<10)
	printf("%d\n",a);
	else if(a<100&&a>=10)
	{			b=a%10;c=a/10;
	e=b*10+c;
            printf("%d\n",e);
	}
			else if(100<=a&&a<1000)
			{			b=a%10;c=a/100;
			d=a+99*b-99*c;
			printf("%d\n",d);
			}
			else if(a>=1000&&a<10000)
			{	b=a%10;c=a/1000;d=(a-1000*c)/100;e=(a-1000*c-100*d)/10;
			f=1000*b+100*e+10*d+c;
			printf("%d\n",f);
			}
else 
{  b=a%10;c=a/10000;d=(a-10000*c)/1000;e=(a%100-b)/10;
f=a+9999*b-9999*c-990*d+990*e;
printf("%d\n",f);
}
}
int main()
{
  int n, a=0, b=0, i;
  scanf("%d", &n);
  if(n%10!=0){
		 a=n%10;
		 n=n/10;
	  }	  
  for(i=0;i<4;i++){
     if(n%10!=0){
	     b=n%10;
		 a=a*10+b;
		 n=n/10;
	  }
  }
  printf("%d\n", a);
  return 0;
}
void Reverse(int n)
{
     if(n>0)
	 {
        printf("%d",n%10);
        Reverse(n/10);
	 }
}
int main()
{
     int num;
    scanf("%d",&num);
     Reverse(num);
     printf("\n");
     return 0;
}
void main()
{
   long n,b,c;
   scanf("%ld",&n);
   b=(n-n%10000)/10000+(n%10000-n%1000)/100+(n%1000-n%100)+(n%100-n%10)*100+(n%10)*10000;
   if(b%10==0)
     
      b=b/10;
   else b=b;
    if(b%10==0)
     
      b=b/10;
   else b=b; 
    if(b%10==0)
   
      b=b/10;
     else b=b;
printf("%d",b);



}
int l;
int main()
{
	char a[5];
	int n;
	void pailie(int n,char ar[]);
   	gets(a);
	l=strlen(a);
	n=l;
	pailie(n,a);
	return 0;
}
void pailie(int n,char ar[])
{
	if(n==1)printf("%c",ar[l-n]);
	else
	{
		pailie(n-1,ar);
		printf("%c",ar[l-n]);
	}
}
int main()
{
	long int x,y,a,b,c,d,e;
	scanf("%d",&x);
	a=x/10000;
	b=(x-10000*a)/1000;
	c=(x-10000*a-1000*b)/100;
	d=(x-10000*a-1000*b-100*c)/10;
	e=(x-10000*a-1000*b-100*c-10*d);
	if(x<10)
		y=e;
	else if(x>=10&&x<100)
		y=10*e+d;
	else if(x>=100&&x<1000)
		y=100*e+10*d+c;
	else if(x>=1000&&x<10000)
		y=1000*e+100*d+10*c+b;
	else if(x>=10000&&x<100000)
		y=10000*e+1000*d+100*c+10*b+a;
	printf("%ld\n",y);
}
int main()
{
	int x,y;
	scanf("%d",&x);
	do{
		y=x%10;
		printf("%d",y);
		x/=10;
	}while(x);
	return 0;
}
int main()
{
  int n,m;
  scanf("%d",&n);
  if(n/10000>0&&n/10000<10)
  {m=n/10000+n/1000%10*10+n/100%10*100+n/10%10*1000+n%10*10000;
  printf("%d",m);}
  if(n/1000>0&&n/1000<10)
  {m=n/1000+m/100%10*10+m/10*100+m%10*1000;
   printf("%d",m);}
  if(n/100>0&&n/100<10)
   { m=n/100+n/10%10*10+n%10*100;
    printf("%d",m);}
   if(n/10<10&&n/10>0)
    { m=n/10+n%10*10;
   printf("%d",m); }
return 0;
}
int main()
{int a,b,c,d,e,f,t;
scanf("%d",&a); 
 if(0<a,a<10) printf("%d\n",a);
	 else if(10<a,a<100){b=a/10;c=a%10;t=10*c+b;
	 printf("%d\n",t);}
	 else if(100<a,a<1000){b=a/100;c=a%100/10;d=a%10;t=100*d+10*c+b;
	 printf("%d\n",t);}
	 else if(1000<a,a<10000){b=a/1000;c=a%1000/100;d=a%100/10;e=a%10;t=1000*e+100*d+10*c+b;
	 printf("%d\n",t);}
	 else if(10000<a,a<100000){b=a/10000;c=a%10000/1000;d=a%1000/100;e=a%100/10;f=a%10;t=10000*f+1000*e+100*d+10*c+b;
	 printf("%d\n",t);}

}
//????????
int main()
{int k,i,a[5];cin>>k;//k???????i??????a[5]?k?????????
for(a[0]=0;a[0]<10;a[0]++)
for(a[1]=0;a[1]<10;a[1]++)
for(a[2]=0;a[2]<10;a[2]++)
for(a[3]=0;a[3]<10;a[3]++)
for(a[4]=0;a[4]<10;a[4]++)
if(a[0]+10*a[1]+100*a[2]+1000*a[3]+10000*a[4]==k)
{for(i=0;i<5;i++){if(a[i]!=0)cout<<a[i];};}
return 0;}
int main()
{
	void f(int x);
	int x;
	scanf("%d",&x);
	f(x);
	return 0;
}
void f(int x)
{
	if (x>=10)
	{
		printf("%d",x%10);
		int y;
		y=(x-x%10)/10;
		f(y);
	}
	else printf("%d\n",x);
}
int main (){
    int n;
    scanf("%d",&n);
    int a,b,c,d,e;
    a=n%10;
    b=(n/10)%10;
    c=(n/100)%10;
    d=(n/1000)%10;
    e=n/10000;
    if(b==0){
        printf("%d",a);
    }else if(c==0){
        printf("%d%d",a,b);
    }else if(d==0){
        printf("%d%d%d",a,b,c);
    }else if(e==0){
        printf("%d%d%d%d",a,b,c,d);
    }else{
        printf("%d%d%d%d%d",a,b,c,d,e);
    }
    return 0;
}
int main()
{
	int a,l,m,n,i;
	int c[5];
	int sum=0;
	scanf("%d",&a);
	n=log10(a);
	for(m=a,i=n;i>=0;i--)
	{
		l=pow(10,i);
		c[i]=m/l;
		m=m%l;
	}
	//printf("%d",&c[i]);
	for(i=0;i<=n;i++)
	{
		sum=sum+c[n-i]*pow(10,i);
	}
	printf("%d",sum);
	
	
	return 0;
}
int main(){
	int n,a,b,c,d,e;
	scanf("%d",&n);
	a=n/10000;
	b=(n-a*10000)/1000;
	c=(n-a*10000-b*1000)/100;
	d=(n-a*10000-b*1000-c*100)/10;
	e=n%10;
	if(d==0){
		printf("%d\n",e);
	}else if(c==0){
		printf("%d%d\n",e,d);
	}else if(b==0){
		printf("%d%d%d\n",e,d,c);
	}else if(a==0){
		printf("%d%d%d%d\n",e,d,c,b);
	}else{
		printf("%d%d%d%d%d\n",e,d,c,b,a);
	}
	return 0;
}
int main()
{
	int a,b,c,d,e,n,m;
	scanf("%d",&n);
	a=(int)(n/10000);
	b=(int)((n-a*10000)/1000);
	c=(int)((n-a*10000-b*1000)/100);
	d=(int)((n-a*10000-b*1000-c*100)/10);
	e=n-a*10000-b*1000-c*100-d*10;
	if(a!=0){
		m=e*10000+d*1000+c*100+b*10+a;}
	else if(a=0&&b!=0){
		m=e*1000+d*100+c*10+b;}
	else if(a==0&&b==0&&c!=0){
		m=e*100+d*10+c;}
	else if(a==0&&b==0&&c==0&&d!=0){
		m=e*10+d;}
	else if(a==0&&b==0&&c==0&&d==0&&e!=0){
		m=e;}
	printf("%d",m);
	return 0;
}
void main()
{
  int a[6],b[6],m,n;
  scanf("%d",&m);
  a[0]=m%10;
  a[1]=(m%100-m%10)/10;
  a[2]=(m%1000-m%100)/100;
  a[3]=(m%10000-m%1000)/1000;
  a[4]=(m%100000-m%10000)/10000;
  if (a[4]!=0) { n=a[0]*10000+a[1]*1000+a[2]*100+a[3]*10+a[4];printf("%d\n",n);}
  else {
         if(a[3]!=0) {n=a[0]*1000+a[1]*100+a[2]*10+a[3];printf("%d\n",n);}
         else {
                if(a[2]!=0) {n=a[0]*100+a[1]*10+a[2];printf("%d\n",n);}
                else{
                      if(a[1]!=0){n=a[1]*10+a[0];printf("%d\n",n);}
                      else {printf("%d\n",a[0]);}
                     }
               }
       }
}
int main()
{
	int n,a[6],i,b[6];
	cin>>n;
	for(i=1;i<=5;i++)
	{
		b[i]=(int)n/pow(10*1.0,(5-i)*1.0);
		a[i]=b[i]%10;

	}
	for(i=1;i<=5;i++)
	{
		if(a[6-i]!=0)
		cout<<a[6-i];
	}
	cout<<endl;
	return 0;
}
void main()
{
	int a,m[6],i,j,x,c,d;
	scanf("%d",&a);
	m[1]=a/10000;
	m[2]=(a-m[1]*10000)/1000;
	m[3]=(a-m[1]*10000-m[2]*1000)/100;
	m[4]=(a-m[1]*10000-m[2]*1000-m[3]*100)/10;
	m[5]=a-m[1]*10000-m[2]*1000-m[3]*100-m[4]*10;
	for(i=1;i<=5;i++)
	{
		if(m[i]!=0)
		{
			c=i;
			d=c;
		    break;
		}	

	}
	for(;c<=5;c++)
	{
		i=5;
		for(j=i-1;j>=c;i--,j--)
		{
				x=m[i];
				m[i]=m[j];
				m[j]=x;
		}
	}
	for(i=d;i<=5;i++)
	{
	    printf("%d",m[i]);
	}
}
int main()
{
   int i;
   int a;
   int b[10000];
   scanf("%d",&a);
   b[5]=a/10000;
   b[4]=(a-10000*b[5])/1000;
   b[3]=(a-10000*b[5]-1000*b[4])/100;
   b[2]=(a-10000*b[5]-1000*b[4]-100*b[3])/10;
   b[1]=a-10000*b[5]-1000*b[4]-100*b[3]-10*b[2];
   if(a>=10000)
   for(i=1;i<=5;i++)
   {
	   printf("%d",b[i]);
   }
if(a>=1000&&a<10000)
   for(i=1;i<=4;i++)
   {
	   printf("%d",b[i]);
   }
if(a>=100&&a<1000)
   for(i=1;i<=3;i++)
   {
	   printf("%d",b[i]);
   }
if(a>=10&&a<100)
   for(i=1;i<=2;i++)
   {
	   printf("%d",b[i]);
   }
   return 0;
}
int main(int argc, char* argv[])
{
	int n,a,b,c,e,f,w;
	scanf("%d",&n);
	if(n>=1&&n<=9){
		printf("n");
	}
	if(n>10 && n<100 ){
		a = n/10;
	    b =n%10;
		w = b*10+a;
	    printf("%d",w);
	}
	if(n>100 && n<1000){
		a = n/100;
		b = n/10-a*10;
		c = n%10;
		w = c*100+b*10+a;
		printf("%d",w);
	}
	if(n>1000 && n<10000){
		a = n/1000;
		b = n/100-a*10;
		c = n/10-a*100-b*10;
		e = n%10;
		w = e*1000+c*100+b*10+a;
		printf("%d",w);
	}
	if(n>10000 && n<100000){
		a = n/10000;
		b = n/1000-a*10;
		c = n/100-a*100-b*10;
		e = n/10-a*1000-b*100-c*10;
		f = n%10;
		w = f*10000+e*1000+c*100+b*10+a;
		printf("%d",w);
	}
    return 0;
}
void main()
{
	int in,a,b,c,d,e;
	scanf("%d",&in);
	a=in/10000;
    in=in-a*10000;
    b=in/1000;
	in=in-b*1000;
	c=in/100;
	in=in-c*100;
	d=in/10;
	in=in-d*10;
	e=in;
	if(a!=0)
		printf("%d\n",a+10*b+100*c+1000*d+10000*e);
	else if(b!=0)
		printf("%d\n",b+10*c+100*d+1000*e);
	else if(c!=0)
		printf("%d\n",c+10*d+100*e);
	else if(d!=0)
		printf("%d\n",d+10*e);
	else
		printf("%d\n",e);
}
int main()
{
    int a=0;                                            //???? 
    int b=0;                                            //???? 
    int c=0;                                           //???? 
    int d=0;                                           //???? 
    int e=0;                                           //???? 
    int f=0;                                           //???? 
    int g=0;                                           //???? 
    cin>>a;                                            //??a?? 
    b=a/10000;                                         //??b?? 
    c=(a-10000*b)/1000;                               //??c?? 
    d=(a-10000*b-1000*c)/100;                        //??d?? 
    e=(a-10000*b-1000*c-100*d)/10;                   //??e?? 
    f=a-10000*b-1000*c-100*d-10*e;                   //??f?? 
    if(b!=0&c!=0&d!=0&e!=0&f!=0)                     //????????????? 
       g=f*10000+e*1000+d*100+c*10+b;
       if(b==0&c!=0&d!=0&e!=0&f!=0)
          g=f*1000+e*100+d*10+c;
          if(b==0&c==0&d!=0&e!=0&f!=0)
             g=f*100+e*10+d;
             if(b==0&c==0&d==0&e!=0&f!=0)
                g=f*10+e;
                if(b==0&c==0&d==0&e==0&f!=0)
                   g=e;
     cout<<g<<endl;
     return 0;
}
int main()
{
	int A,B,C,D,E,y,x1,x2,x3,x4,x;
	scanf("%d\n",&x1);
	scanf("%d\n",&x2);
    scanf("%d\n",&x3);
	scanf("%d\n",&x4);
	x=x1;
	if(x<10)
		y=x;
	else
	{
		if(x<100)
		{A=x/10;
			B=x%10;
			y=B*10+A;
		
		}
		else
		{
			if(x<1000)
			{A=x/100;
				B=x%100/10;
				C=x%10;
				y=C*100+B*10+A;}
			else
			{
				if(x<10000)
				{	A=x/1000;
				    B=x%1000/100;
					C=x%100/10;
					D=x%10;
					y=D*1000+C*100+B*10+A;}
				else
                    A=x/10000;
				    B=x%10000/1000;
					C=x%1000/100;
					D=x%100/10;
					E=x%10;
					y=E*10000+D*1000+C*100+B*10+A;
			}
		}
	}
printf("%d\n",y);
	x=x2;
if(x<10)
		y=x;
	else
	{
		if(x<100)
		{A=x/10;
			B=x%10;
			y=B*10+A;
		
		}
		else
		{
			if(x<1000)
			{A=x/100;
				B=x%100/10;
				C=x%10;
				y=C*100+B*10+A;}
			else
			{
				if(x<10000)
				{	A=x/1000;
				    B=x%1000/100;
					C=x%100/10;
					D=x%10;
					y=D*1000+C*100+B*10+A;}
				else
                    A=x/10000;
				    B=x%10000/1000;
					C=x%1000/100;
					D=x%100/10;
					E=x%10;
					y=E*10000+D*1000+C*100+B*10+A;
			}
		}
	}
printf("%d\n",y);
x=x3;
if(x<10)
		y=x;
	else
	{
		if(x<100)
		{A=x/10;
			B=x%10;
			y=B*10+A;
		
		}
		else
		{
			if(x<1000)
			{A=x/100;
				B=x%100/10;
				C=x%10;
				y=C*100+B*10+A;}
			else
			{
				if(x<10000)
				{	A=x/1000;
				    B=x%1000/100;
					C=x%100/10;
					D=x%10;
					y=D*1000+C*100+B*10+A;}
				else
                    A=x/10000;
				    B=x%10000/1000;
					C=x%1000/100;
					D=x%100/10;
					E=x%10;
					y=E*10000+D*1000+C*100+B*10+A;
			}
		}
	}
printf("%d\n",y);
 x=x4;
if(x<10)
		y=x;
	else
	{
		if(x<100)
		{A=x/10;
			B=x%10;
			y=B*10+A;
		
		}
		else
		{
			if(x<1000)
			{A=x/100;
				B=x%100/10;
				C=x%10;
				y=C*100+B*10+A;}
			else
			{
				if(x<10000)
				{	A=x/1000;
				    B=x%1000/100;
					C=x%100/10;
					D=x%10;
					y=D*1000+C*100+B*10+A;}
				else
                    A=x/10000;
				    B=x%10000/1000;
					C=x%1000/100;
					D=x%100/10;
					E=x%10;
					y=E*10000+D*1000+C*100+B*10+A;
			}
		}
	}
printf("%d",y);

	return 0;}