semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int z,q,s,l;
    int i,j;
    int t;char ch;
    char a[4]={'z','q','s','l'};
    int b[4];
    for(z=10;z<=50;z=z+10)
     for(q=10;q<=50;q=q+10)
      for(s=10;s<=50;s=s+10)
       for(l=10;l<=50;l=l+10)
       {
          if(((z+q)==(s+l))&&
          ((z+l)>(s+q))&&
          ((z+s)<q)==1)
          {
            b[0]=z;
            b[1]=q;
            b[2]=s;
            b[3]=l;
          }
        }

        for(i=0;i<3;i++)
         for(j=0;j<3-i;j++)
         {
            if(b[j]<b[j+1])
            {
                t=b[j];
                b[j]=b[j+1];
                b[j+1]=t;
                ch=a[j];
                a[j]=a[j+1];
                a[j+1]=ch;
            }
          }
        for(i=0;i<=3;i++)
        cout<<a[i]<<' '<<b[i]<<endl;
        return 0;
}
int main()
{
	int z,q,s,l,a,b,c,d;
	char x1,x2,x3,x4;
	for (z=1;z<=5;z++)
	{
        for (q=1;q<=5;q++)
		{
			for (s=1;s<=5;s++)
			{
				for (l=1;l<=5;l++)
				{
					if (z+q==s+l&&z+l>s+q&&z+s<q&&z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)
					{
						a=z;
						x1='z';
						if (q>a)
						{
							b=a;
							a=q;
							x2=x1;
							x1='q';
						}
						else
						{
							b=q;
							x2='q';
						}
						if (s>b)
						{
							if (s>a)
							{
								c=b;
								b=a;
								a=s;
								x3=x2;
								x2=x1;
								x1='s';
							}
							else
							{
								c=b;
								b=s;
								x3=x2;
								x2='s';
							}
						}
						else
						{
							c=s;
							x3='s';
						}
						if (l>c)
						{
							if (l>b)
							{
								if (l>a)
								{
									d=c;
									c=b;
									b=a;
									a=l;
									x4=x3;
									x3=x2;
									x2=x1;
									x1='l';
								}
								else
								{
									d=c;
									c=b;
									b=l;
									x4=x3;
									x3=x2;
									x2='l';
								}
							}
							else
							{
								d=c;
								c=l;
								x4=x3;
								x3='l';
							}
						}
						else
						{
							d=l;
							x4='l';
						}
					}
				}
			}
		}
	}
	cout<<x1<<" "<<a*10<<endl;
	cout<<x2<<" "<<b*10<<endl;
	cout<<x3<<" "<<c*10<<endl;
	cout<<x4<<" "<<d*10<<endl;
	return 0;
}
int main ( )
{
	int z, q, s, l, i, j, m, n, p;
	for (i = 1;i <= 5;i++)/*??????*/
	{
		z = i;
		for (j = 1;j <= 5;j++)
		{
			if (j == i) continue;/*???????????*/
			else q = j;
			for (m = 1;m <= 5;m++)
			{
				if (m == i||m == j) continue;
				else s = m;
				for (n = 1;n <= 5;n++)
				{
					if (n == i||n == j||n == m) continue;
					else l = n;
					if ((z + q == s + l)&&(z + l>s + q)&&(z + s < q))
					{
						for (p = 5;p >= 1;p--)/*??????*/
						{
							if (z == p) cout <<'z'<<' '<<10*z <<endl;
							if (q == p) cout <<'q'<<' '<<10*q <<endl;
							if (s == p) cout <<'s'<<' '<<10*s <<endl;
							if (l == p) cout <<'l'<<' '<<10*l <<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int z,q,s,l,i,Q,S,L,Z;
    for(z=1;z<6;z++)
    for(q=1;q<6;q++)
    for(s=1;s<6;s++)
    for(l=1;l<6;l++)
    {
         if(z+q==s+l&&z+l>s+q&&z+s<q)
         { 
          Z=z;Q=q;L=l;S=s;                                                      
         break;
         }
         }
       for(i=5;i>0;i--)
       {
       if(Z==i)cout<<"z "<<Z*10<<endl;   //??????
       if(S==i)cout<<"s "<<S*10<<endl;
       if(L==i)cout<<"l "<<L*10<<endl;
       if(Q==i)cout<<"q "<<Q*10<<endl;
       }
    return 0;
}
int main()
{
   int b[4];
   char a[4]={'z','q','s','l'};
   for(b[0]=1;b[0]<=5;b[0]++)
	   for(b[1]=1;b[1]<=5;b[1]++)
		   for(b[2]=1;b[2]<=5;b[2]++)
			   for(b[3]=1;b[3]<=5;b[3]++)
				   if((b[0]-b[1])*(b[0]-b[2])*(b[0]-b[3])*(b[1]-b[2])*(b[1]-b[3])*(b[2]-b[3])&&b[0]+b[1]==b[2]+b[3]&&b[0]+b[3]>b[1]+b[2]&&b[0]+b[2]<b[1])
				   {
					   for(int i=5;i>0;i--)
						   for(int j=0;j<4;j++)
							   if(b[j]==i)
								   cout<<a[j]<<" "<<i*10<<endl;
				   }
	return 0;

}
int main()
  {
  int z=1,q=1,s=1,l=1,i=1;
   for(z=1;z<=5;z++)
    for(q=1;q<=5;q++)
     for(s=1;s<=5;s++)
      for(l=1;l<=5;l++)
       if(((z+q)==(s+l))+((z+l)>(s+q))+(q>(z+s))==3)
        if((z!=q)&&(q!=s)&&(s!=l)&&(q!=s)&&(s!=l)&&(q!=l))
          
          
         for(i=5;i>=1;i--)
            
         {if(s==i)cout<<"s"<<' '<<10*s<<endl;
          if(z==i)cout<<"z"<<' '<<10*z<<endl;
          if(q==i)cout<<"q"<<' '<<10*q<<endl;
          if(l==i)cout<<"l"<<' '<<10*l<<endl;
         }
        
  
    return 0;
}
int main()
{
	char name[5] = {"zqsl"};
	int i, max = 0, weiz, weiq, weis, weil, wei[4] = {0};
	for (weiz = 10; weiz <= 50; weiz += 10)
		for (weiq = 10; weiq <= 50; weiq += 10)
			for (weis = 10; weis <= 50; weis += 10)
				for (weil = 10; weil <= 50; weil += 10)
					if ((weiz + weiq == weis + weil) && (weiz + weil > weis + weiq) && (weiz + weis < weiq))
					{
						wei[0] = weiz;
						wei[1] = weiq;
						wei[2] = weis;
						wei[3] = weil;
					}
	for (i = 0; i < 4; i++)
		if (wei[i] == 50)
		{
			cout << name[i] << ' ' << "50" << endl;
			wei[i] = 0;
		}
	for (i = 0; i < 4; i++)
		if (wei[i] == 40)
		{
			cout << name[i] << ' ' << "40" << endl;
			wei[i] = 0;
		}
	for (i = 0; i < 4; i++)
		if (wei[i] == 30)
		{
			cout << name[i] << ' ' << "30" << endl;
			wei[i] = 0;
		}
	for (i = 0; i < 4; i++)
		if (wei[i] == 20)
		{
			cout << name[i] << ' ' << "20" << endl;
			wei[i] = 0;
		}
	for (i = 0; i < 4; i++)
		if (wei[i] == 10)
			cout << name[i] << ' ' << "10" << endl;
	return 0;
}
struct student
	{
		int weigh;
	};
int main()
{

	int a=0,b=0,c=0,d=0;
	struct student zhao,qian,sun,li;
	zhao.weigh=a;
	qian.weigh=b;
	sun.weigh=c;
	li.weigh=d;
	for(a=10;a<=50;a=a+10)
		for(b=10;b<=50;b=b+10)
			for(c=10;c<=50;c=c+10)
				for(d=10;d<=50;d=d+10)
				{
					if(a!=b&&a!=c&&a!=d&&b!=c&&b!=d&&c!=d)
						if(a+d>c+b)
							if(a+c<b)
								if((a+b)==(c+d))
								{
									printf("l %d\nq %d\nz %d\ns %d",d,b,a,c);
									printf("\n");
								}
				}
				return 0;
}
int main()
{
	int ren[5],i;
    char name[5]={'0','z','q','s','l'};
    for(ren[1]=1;ren[1]<=5;ren[1]++)
		for(ren[2]=1;ren[2]<=5;ren[2]++)
			for(ren[3]=1;ren[3]<=5;ren[3]++)
			{
				ren[4]=ren[1]+ren[2]-ren[3];
				if(ren[4]>0&&ren[4]<=5&&(ren[1]+ren[4])>(ren[2]+ren[3])&&(ren[1]+ren[3])<ren[2])
				{
					for(i=5;i>=1;i--)
						for(ren[0]=1;ren[0]<=4;ren[0]++)
							if (ren[ren[0]]==i) 
							{
								cout<<name[ren[0]]<<' '<<i<<'0'<<endl;
								break;
							}
					break;
				}
			}
	return 0;
}
int main()
{
 int a,b,c,d,e,f,g,h,i,m,n;
 for(a=1;a<=5;a++)
  {
   for(b=1;b<=5;b++)
   {
    for(c=1;c<=5;c++)
    {
     for(d=1;d<=5;d++)
      {
       if((a+b==c+d)&&(a+d)>(b+c)&&(a+c)<b)
       { e=10*a; 
       f=10*b; 
       g=10*c; 
       h=10*d;}
      } 
     }
    }
   }
 if (e<f) 
  {
   i=e;
   e=f;
   f=i;
  }
 if (e<g)
  {
   i=e;
   e=g;
   g=i;
  }
 if (e<h)
  {
   i=e;
   e=h;
   h=i;
  }
 printf("l %d\n",e);
 if (f<g)
  {
   m=f;
   f=g;
   g=m;
  }
 if (f<h)
  {
   m=f;
   f=h;
   h=m;
  }
 printf("q %d\n",f);
 if (g<h)
  {
   n=g;
   g=h;
   h=n;
  }
 printf("z %d\n",g);
 printf("s %d\n",h);
 return 0;
}
int main(){
int z,q,s,l,a,b,c;
z=q=s=l=10;

    for(z=10;z<=50;z=z+10)
    {
  for(q=10;q<=50;q=q+10)
  {
  for(s=10;s<=50;s=s+10)
  {
  for(l=10;l<=50;l=l+10)
  {
  a=z+q,b=z+l,c=z+s;
  if(a==s+l&&b>s+q&&c<q)
  {
  cout<<"l "<<l<<endl<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s<<endl;
  }
  }
  }
  }
    }
return 0;
}
/*???????
 *??????
 *?????2012-10-15
 *???????????????????????????????????????????????????????????10???????????????50?????????????????????????????; ????????????????????????????????????????????????????????????????????????????????????????????
 */

int main ()
{
	char m[] = {'z','q','s','l'},k;//????m[]???????????????????k
	int a,b,c,d,n[4],i,j,p;//??a?b?c?d????z,q,s,l????n[4]???????????????i,j?????p
	for (a = 10; a <= 50; a = a + 10)//?????????????
		for (b = 10; b <= 50; b = b + 10)//?????????????
		{
			if (a == b)//??????????????????
				continue;
			for (c = 10; c <= 50; c = c + 10)//?????????????
			{
				if (c == a || c == b)//?????????????????
					continue;
				for (d = 10; d <= 50; d = d + 10)////?????????????
				{
					if (d == a || d == b || d == c)//?????????????????
						continue;
					if ((a + b) == (c + d) && (a + d) > (b + c) && (a + c) < b)//???????????????????????????n?
					{
						n[0] = a;
						n[1] = b;
						n[2] = c;
						n[3] = d;
					}
				}
			}
		}
	for (i = 0; i <= 2; i++)//??????????
	{
		for (j = 0; j <= 2 - i; j++)//????
		{
			if (n[j] < n[j + 1])//????????????????????????m???????????????????
			{
				p = n[j];
				n[j] = n[j + 1];
				n[j + 1] = p;
				k = m[j];
				m[j] = m[j + 1];
				m[j + 1] = k;
			}
		}
	}
	for (i = 0; i < 4; i++)//????????????????????????????
		cout << m[i] << " " << n[i] << endl;
	return 0;
}
int main()
{
	int weight[10],a[10];
	int i,j,k,l;
	for(i=1;i<=5;i++)
	{
		weight[1]=10*i;
		for(j=1;j<=5;j++)
		{
			if(j!=i)
				weight[2]=j*10;
			else
				continue;
			for(k=1;k<=5;k++)
			{
				if((k!=i)&&(k!=j))
					weight[3]=10*k;
				else
					continue;
				for(l=1;l<=5;l++)
				{
					if((l!=i)&&(l!=j)&&(l!=k))
						weight[4]=10*l;
					else
						continue;
				     	if((weight[1]+weight[2]==weight[3]+weight[4])&&(weight[1]+weight[4]>weight[2]+weight[3])&&(weight[1]+weight[3]<weight[2]))
						{
							a[1]=weight[1];
							a[2]=weight[2];
							a[3]=weight[3];
							a[4]=weight[4];
						}

					}
				}
			}
		}
	
	char name[10]={0,'z','q','s','l'};
	char m;
    for(i=1;i<=3;i++)
	{
		for(j=1;j<=4-i;j++)
		{
			if(a[j]<a[j+1])
			{
				k=a[j];
				a[j]=a[j+1];
				a[j+1]=k;
				m=name[j];
				name[j]=name[j+1];
				name[j+1]=m;
			}
		}
	}
	for(l=1;l<=4;l++)
	{
		cout<<name[l]<<' '<<a[l]<<endl;
	}

	
	return 0;
}
//*******************************
//????l10.cpp               *
//????? 1? 1200012895     *
//???2012?10?11?          *
//??????                  *
//*******************************
int main()
{
	char m[4];                                       //?????????
	int a, b, c, d, p[5],i, j, k, n;
    for ( a = 10; a <= 50; a = a + 10 )
	{
		for ( b = 10; b <= 50; b = b + 10 )
		{
			for ( c = 10; c <= 50; c = c + 10)
			{
				for ( d = 10; d <= 50; d = d + 10)
				{
					if ( ( ( a + b ) == ( c + d ) ) &&
			              ( ( a + d ) > ( b + c ) ) &&
		                  ( ( a + c ) < b ) ) 
					{
						  p[1] = a;                 //?????????????
						  p[2] = b;
						  p[3] = c;
						  p[4] = d;
						  break;
					}
				}
			}
		}
	} 
	m[1] = 'z';                                     //???????
	m[2] = 'q';
	m[3] = 's';
	m[4] = 'l';
	for ( j = 1; j <= 3; j++ )                      //??????????
	{
		for ( i = 1; i <= 4 - j; i++ )
		{
			if ( p[i] < p[i+1] )
			{
				k = p[i];
				p[i] = p[i+1];
				p[i+1] = k;
				n = m[i];
				m[i] = m[i+1];
				m[i+1] = n;
			}
		}
	}
	cout << m[1] << " " << p[1] << endl;            //????????????
    cout << m[2] << " " << p[2] << endl;
	cout << m[3] << " " << p[3] << endl;
    cout << m[4] << " " << p[4] << endl;
	return 0;
}
int main()
{
	int a[4], g = 0, i, max = 0, temp, max1 = 0, max2 = 0, max3 = 0;												//a[0] == z    a[1] == q       a[2] == s       a[3] == l
	char b[4] = {'z', 'q', 's', 'l'};
	for (a[0] = 10; a[0] <= 50; a[0] += 10)
	{
		for (a[1] = 10; a[1] <= 50; a[1] += 10)
		{
			for (a[2] = 10; a[2] <= 50; a[2] += 10)
			{
				for (a[3] = 10; a[3] <= 50; a[3] += 10)
				{
					if (a[0] != a[1] && a[0] != a[2] && a[0] != a[3] && a[1] !=a[2] && a[1] != a[3] && a[2] != a[3]
						&& (a[0] + a[1] == a[2] + a[3]) && (a[0] + a[3] > a[1] + a[2]) && (a[0] + a[2] < a[1]))
					{
						g = 1;
						break;
					}
				}
				if (g == 1)
					break;
			}
			if (g == 1)
				break;
		}
		if (g == 1)
			break;
	}
	for (i = 0; i < 4; i ++)
	{
		if (a[i] > max)
		{
			max = a[i];
			temp = i;
		}
	}
	cout << b[temp] << " " << max << endl;
	for (i = 0; i < 4; i ++)
	{
		if (a[i] == max)
		{
			continue;
		}
		if (a[i] > max1)
		{
			max1 = a[i];
			temp = i;
		}
	}
	cout << b[temp] << " " << max1 << endl;
	for (i = 0; i < 4; i ++)
	{
		if (a[i] == max || a[i] == max1)
		{
			continue;
		}
		if (a[i] > max2)
		{
			max2 = a[i];
			temp = i;
		}
	}
	cout << b[temp] << " " << max2 << endl;
	for (i = 0; i < 4; i ++)
	{
		if (a[i] == max || a[i] == max1 || a[i] == max2)
		{
			continue;
		}
		if (a[i] > max3)
		{
			max3 = a[i];
			temp = i;
		}
	}
	cout << b[temp] << " " << max3 << endl;
	return 0;			
}
/*
 * 32.cpp
 *
 *  Created on: 2012-10-18
 *      Author: zhuyongfu
 */


int main(){
	int z,q,s,l;//????
	for(z = 1;z <= 5;z++)//????
	{
		for(q = 1;q <= 5;q++)//????
		{
			for(s = 1;s <= 5;s++)//????
			{
				for(l = 1;l <= 5;l++)//????
				{
					if((z + q == s + l)&&(z + l > s + q)&&(z + s < q))//?????????
						cout << 'l' << ' ' << l * 10 << '\n' << 'q' << ' ' << q * 10 << '\n' << 'z' << ' ' << z * 10 << '\n' << 's' << ' ' << s * 10;//?????
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z,q,s,l;
	for(z=10;z<=50;z=z+10)
	{
		for(q=10;q<=50;q=q+10)
		{
			if(z==q)
				continue;
			for(s=10;s<=50;s=s+10)
			{
				if(z==s||z==q||z==q)
					continue;
				for(l=10;l<=50;l=l+10)
				{
					if(z==s||z==q||z==l||q==s||q==l||s==l)
					{	
						continue;
					}
					if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))
					{
						cout<<"l "<<l<<endl<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s<<endl;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z,q,s,l;
	for(z=10;z<60;z=z+10)
	{
		for(q=10;q<60;q=q+10)
		{
			if(q==z) continue;
			for(s=10;s<60;s=s+10)
			{
				if(s==z||s==q) continue;
				for(l=10;l<60;l=l+10)
				{
					if(l==z||l==q||l==s) continue;
					if(z+q==s+l&&z+l>s+q&&z+s<q)
					{
						if(q>z)
						{
						cout<<'l'<<' '<<l<<endl;
						cout<<'q'<<' '<<q<<endl;
						cout<<'z'<<' '<<z<<endl;
						cout<<'s'<<' '<<s<<endl;
						}
						if(z>q)
						{
							cout<<'l'<<' '<<l<<endl;
							cout<<'z'<<' '<<z<<endl;
							cout<<'q'<<' '<<q<<endl;
							cout<<'s'<<' '<<s<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
/*
 * 12.cpp
 * function:????????????????????????????
 * Created on: 2012-10-23
 * Author: sear
 */
int main(){
	int z,q,s,l;//z q s l???????????
	for(z=10;z<=50;z=z+10){//z?10???????50
		for(q=10;q<=50;q=q+10){//q?10???????50
			if(q==z) continue;//????????????
			for(s=10;s<=50;s=s+10){//s?10???????50
				if((s==z)||(s==q)) continue;//??????????????
				for(l=10;l<=50;l=l+10){//l?10???????50
					if((l==z)||(l==q)||(l==s)) continue;//???????????????
					if((z+q==s+l)&&(z+l>s+q)&&(z+s<q)){//??????
						//?z+s<q????????
                    if(q<l) {//??????????????
                    	cout<<'l'<<" "<<l<<"\n"<<'q'<<" "<<q<<endl;//????? ??????
                    	if(z>s) cout<<'z'<<" "<<z<<"\n"<<'s'<<" "<<s;//??????????????? ??????
                    	else cout<<'s'<<" "<<s<<"\n"<<'z'<<" "<<z;//??????????????? ??????
                    }
                    else {
                    	cout<<'q'<<" "<<q<<endl;//??????????????
                        if((z>l)&&(z>s)) {//???????
                    	  cout<<'z'<<" "<<z<<endl;//?????????
                          if(l>s) cout<<'l'<<" "<<l<<"\n"<<'s'<<" "<<s;//??????????????? ??????
                          else cout<<'s'<<" "<<s<<"\n"<<'l'<<" "<<l;//??????????????? ??????
                         }
                    else if((l>z)&&(l>s)) {//???????
                    	   cout<<'l'<<" "<<l<<endl;//?????????
                           if(z>s) cout<<'z'<<" "<<z<<"\n"<<'s'<<" "<<s;//??????????????? ??????
                           else cout<<'s'<<" "<<s<<"\n"<<'z'<<" "<<z;//??????????????? ??????
                         }
                    else if((s>z)&&(s>l)) {//???????
                    	   cout<<'s'<<" "<<s<<endl;//?????????
                           if(z>l) cout<<'z'<<" "<<z<<"\n"<<'l'<<" "<<l;//??????????????? ??????
                           else cout<<'l'<<" "<<l<<"\n"<<'z'<<" "<<z;//??????????????? ??????
                         }
                    }
              }}}}}
		return 0;//
}
int main( )
{
	int zhao, qian, sun, li, i;
	char weight[51];
	for(i = 0; i < 51; i++)
	{
		weight[i] = ' ';
	}
	for(zhao = 10; zhao <= 50; zhao=zhao+10)
		for(qian = 10; qian <= 50; qian=qian+10)
		{
			if(zhao != qian)
				for(sun = 10; sun <= 50; sun=sun+10)
				{
					if(zhao != sun && qian != sun)
					{
						for(li = 10; li <= 50; li=li+10)
							if(zhao != li && qian != li && sun != li)
								if(((zhao+qian)==(sun+li))&&((zhao+li)>(sun+qian))&&((zhao+sun)<qian))
								{
									weight[zhao] = 'z';
									weight[qian] = 'q';
									weight[sun] = 's';
									weight[li] = 'l';
									for(i = 50; i > 0; i--)
									{
										if(weight[i] != ' ')
											cout<<weight[i]<<" "<<i<<endl;
									}
								}
					}
				}
		}
		return 0;
}
int main(){
	int z,q,s,l,A,B,C,D;
	for(z=1;z<=5;z++)
		for(q=1;q<=5;q++)
			for(s=1;s<=5;s++)
				for(l=1;l<=5;l++){
					if((z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l)){
						A=((z+q)==(s+l));
						B=((z+l)>(s+q));
						C=((z+s)<q);
						D=A+B+C;
						if(D==3){
							if(z==5)
								printf("z 50\n");
							else
								if(q==5)
									printf("q 50\n");
								else
									if(s==5)
										printf("s 50\n");
									else
										if(l==5)
											printf("l 50\n");
							if(z==4)
								printf("z 40\n");
							else
								if(q==4)
									printf("q 40\n");
								else
									if(s==4)
										printf("s 40\n");
									else
										if(l==4)
											printf("l 40\n");
							if(z==3)
								printf("z 30\n");
							else
								if(q==3)
									printf("q 30\n");
								else
									if(s==3)
										printf("s 30\n");
									else
										if(l==3)
											printf("l 30\n");
							if(z==2)
								printf("z 20\n");
							else
								if(q==2)
									printf("q 20\n");
								else
									if(s==2)
										printf("s 20\n");
									else
										if(l==2)
											printf("l 20\n");
							if(z==1)
								printf("z 10\n");
							else
								if(q==1)
									printf("q 10\n");
								else
									if(s==1)
										printf("s 10\n");
									else
										if(l==1)
											printf("l 10\n");
						}
					}
				}
	return 0;
}
int main()
{   
 int z,q,s,l,k;
 for(z=10;z<=50;z=z+10)
 {   k=0;
  for(q=10;q<=50;q=q+10)
   {
    for(s=10;s<=50;s=s+10)
    {
     for(l=10;l<=50;l=l+10)
    {  k=(z+q==s+l)+(z+l>s+q)+(z+s<q)+(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l);
             if(k==4)
        break;
    }   
     if(k==4)
     break;
  }
  if(k==4)
   break;
  }
     if(k==4)
   break;
 }
 cout<<"l "<<l<<endl;
 cout<<"q "<<q<<endl;
 cout<<"z "<<z<<endl;
 cout<<"s "<<s<<endl;
 return 0;
}
int main ()
{
	int a,b,c,d;
	for(a=10;a<=50;a+=10)
		for(b=10;b<=50;b+=10)
			for(c=10;c<=50;c+=10)
				for(d=10;d<=50;d+=10)
		           if(a+b==c+d && (a+d)>(b+c) && (a+c)<b)
					{
						int kg[4]={a,b,c,d};
				        char py[4]={'z','q','s','l'};
				        int t;
				        char k;
				        for (int j=0;j<3;j++)
				        	for (int i=0;i<3-j;i++)
				        	{
				               if (kg[i]<kg[i+1])
				              {
				        	     t=kg[i];
				        	     kg[i]=kg[i+1];
				        	     kg[i+1]=t;
				        	     k=py[i];
				                 py[i]=py[i+1];
				        	     py[i+1]=k;
				              }
				        	}

	                cout<<py[0]<<" "<<kg[0]<<endl;
	                cout<<py[1]<<" "<<kg[1]<<endl;
	                cout<<py[2]<<" "<<kg[2]<<endl;
	                cout<<py[3]<<" "<<kg[3]<<endl;
					}
	   return 0;
}
/*
 * ???012.cpp
 * Created on: 2012-10-14
 * ???:???
 * ??????
 */
int main(){            //???
  int z = 1,q = 1,s = 1,l = 1;                                          //??z q s l???
  for (z=1;z<=5;z++){                                                   //??z??
	  for(q=1;q<=5;q++){                                                //??q??
			  if(z!= q){                                                //??z q???
				  for (s=1;s<=5;s++){                                   //??s??
					  if (s!=z && s!=q){                               //???????
                         for(l=1;l<=5;l++){                            //??l??
                        	 if(l!=z && l!=q && l!=s ){                 //??????
						     if (z==s+l-q && z>s+q-l && z<q-s){         //??????
                        	 int a[4]={z,q,s,l},i,j,t;                  //???????i j t???
                        	 char m[4]={'z','q','s','l'},x;             //?????????x????
                        	 for (j=0;j<3;j++){                         //??3???
                        		 for(i=0;i<3-j;i++){                    //??????3-j???
                        			 if (a[i]<a[i+1]){                  //???????????
                        				 t=a[i]; a[i]=a[i+1];a[i+1]=t;            //?????
                        				 x=m[i]; m[i]=m[i+1];m[i+1]=x;}           //????????
                        			 }
                        		 }
                        	 cout<<m[0]<<" "<<a[0]*10<<endl;                           //?????
                        	 cout<<m[1]<<" "<<a[1]*10<<endl;                           //??????
                        	 cout<<m[2]<<" "<<a[2]*10<<endl;                           //?????
                        	 cout<<m[3]<<" "<<a[3]*10<<endl;                           //?????

                        	 }
							 }
						  }
					 }
				 }
			 }
         }
  }
   return 0;
   }
void f(int z,int q,int s,int l)
{
	int i;
	for(i=5;i>0;i--)
	{
		if(z==i) cout<<"z "<<10*i<<endl;
		if(q==i) cout<<"q "<<10*i<<endl;
		if(s==i) cout<<"s "<<10*i<<endl;
		if(l==i) cout<<"l "<<10*i<<endl;
	}
}

int main()
{
	int z,q,s,l;
	for(z=1;z<6;z++)
	{
		//if(z==2) cout<<2<<endl;
		for(q=1;q<6;q++)
		{
			if(q!=z)//if(z==2&&q==4) cout<<q<<endl;

			for(s=1;s<6;s++)
			{
				if(s!=q&&s!=z)
				{

				//if(z==2&&q==4&&s==1) cout<<2<<endl;
				l=z+q-s;
				if(l>0&&l<6&&l!=z&&l!=q&&l!=s)
					if(z+l>s+q)
						if(z+s<q)
							f(z,q,s,l);
				}
			}
		}
	}
	return 0;
}
int compare (int z, int q, int s, int l, int i)
{
	int a[4] = {z, q, s, l};
int j, k, t;
for (j = 4; j > 0; j--)
	for (k = 1; k < j; k++)
	{
	if(a[k] > a[k - 1])
	   {
		t = a[k];
		a[k] = a[k - 1];
		a[k - 1] = t;
	   }
	}
return (a[i - 1]);
}
int fout( int z, int q, int s, int l, int sum)
{
if(sum == z) cout << "z";
if(sum == q) cout << "q";
if(sum == s) cout << "s";
if(sum == l) cout << "l";
return 0;
}
int main()
{
int z, q, s, l, i, sum;
for(z = 10; z < 60; z += 10)
for(q = 10; q < 60; q += 10)
	for(s = 10; s < 60; s += 10)
			for(l = 10; l < 60; l += 10)
			if( (z - q) * (z - s) * (z - l) * (q - s) * (q - l) * (s - l) != 0
			    && z + q == s + l
				&& z + l > s + q
				&& z + s < q )
{
for(i = 1; i <= 4; i++)
      { 
	  sum = compare(z, q, s, l, i);
	  fout(z, q, s, l, sum);
	  cout << " " << sum <<endl;
      }
}
return 0;
}
int main()
{
    int z=0,q=0,s=0,l=0;
    for(z=1;z<6;z++){
    for(q=1;q<6;q++){
      if(z==q)
      continue;
    for(s=1;s<6;s++){
       if(z==s||q==s)
       continue;
    for(l=1;l<6;l++){
        if(z==l||q==l||s==l)
        continue;
    if((z+q==s+l)&&(z+l>s+q)&&(z+s)<q)
    {cout << "l" <<" " << l*10 << endl;
    cout << "q" <<" " << q*10 << endl;
    cout << "z" <<" " << z*10 << endl;
    cout << "s" <<" " << s*10 << endl;}}}}}
  
    return 0;
}
int main()
{
	int tz[4],i,j,p;
	char x[4]={'z','q','s','l'},xs;
	for(tz[0]=1;tz[0]<=5;tz[0]++)
		for(tz[1]=1;tz[1]<=5;tz[1]++)
		{
			if(tz[1]==tz[0]) continue;
			else
			{
				for(tz[2]=1;tz[2]<=5;tz[2]++)
				{
						if(tz[2]==tz[0] || tz[2]==tz[1]) continue;
						else
						{
							tz[3]=tz[1]+tz[0]-tz[2];
							if(tz[0]+tz[3]>tz[1]+tz[2] && tz[0]+tz[2]<tz[1])
							{
								for(i=0;i<3;i++)
								{
									for(j=0;j<3-i;j++)
									{
										if(tz[j]<tz[j+1])
										{
											p=tz[j];
											tz[j]=tz[j+1];
											tz[j+1]=p;
											xs=x[j];
											x[j]=x[j+1];
											x[j+1]=xs;
										}
									}
								}
								for(j=0;j<4;j++)
								{
									cout<<x[j]<<' '<<tz[j]*10<<endl;
								}
							}
						}
				}
			}
		}
	return 0;
}