#include<stdio.h>
main()
{

	int x,y,n=0,bc,ac,k,a,b,i,q,e;
	
	printf("Unesi broj x: ");
	scanf("%d",&x);
	printf("Unesi broj y: ");
	scanf("%d",&y);
	
	for(a=x,b=y;a>0 || b>0;a=a/10,b=b/10)
	n++;
	for(i=0,q=1;i<n-1;i++)
	q=q*10;
	
	for(a=x,b=y,k=0,i=0;i<n;i++,q=q/10)
	{
		ac=(a/q)%10;
		bc=(b/q)%10;

		if(ac==bc)
		k=k*100+(ac*10)+bc;
		else if(ac>bc)
		k=k*10+ac;
		else
		k=k*10+bc;
	}
	printf("Broj je %d",k);
	
}