semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/*
 * ???.cpp
 *
 *  Created on: 2013-10-15
 *      Author:???
 */
int main()
{
	int cc1,cc2,cc3;
	int z,q,s,l,a,b,c,d,e;
	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==l)||(z==q)||(z==s)||(q==s)||(q==l)||(s==l)) continue;
					a=z+q;
					b=s+l;
					c=z+l;
					d=s+q;
					e=z+s;
					cc1=(a==b);
					cc2=(c>d);
					cc3=(e<q);
					if(cc1+cc2+cc3==3)//????????
					{
						if(l<q)
							cout<<"q"<<" "<<q<<"0"<<"\n"<<"l"<<" "<<l<<"0"<<endl;
						else
							cout<<"l"<<" "<<l<<"0"<<"\n"<<"q"<<" "<<q<<"0"<<endl;
						if(z<s)
							cout<<"s"<<" "<<s<<"0"<<"\n"<<"z"<<" "<<z<<"0"<<endl;
						else
							cout<<"z"<<" "<<z<<"0"<<"\n"<<"s"<<" "<<s<<"0"<<endl;//????

					}
				}
	return 0;
}
/*
??????????????????????????????
??????????????????????????10?????
??????????50?????????????????????????????;
???????????????????????????????????????????
?????????????????????????????????????????????????
????
?
????
???????????????????????????????
????
?
????
z 10

q 20

s 30

l 40

?????????????
????
*/
int main()
{
   int z,q,s,l,i,j,a,A[4];                  //???`?`?`??????,????i`j,????a,????A
   char b,B[4]={'z','q','s','l'};           //?????????b,??????????B
   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+l&&z+s<q)    //?????????????
           {
              A[0]=z;                       //???A??????
              A[1]=q;                           
              A[2]=s;
              A[3]=l;
           }   
         }    
       }    
     }    
   }   
   for (i=0;i<4;i++)                        //?????,?????????,???????????????
   {
      for (j=0;j<3-i;j++)
      {
        if (A[j]<A[j+1])  
        {
           a=A[j];
           A[j]=A[j+1];
           A[j+1]=a;
           b=B[j];
           B[j]=B[j+1];
           B[j+1]=b;                 
        }  
      }    
   }
   for (i=0;i<4;i++)                        //?????????????
   {
      cout<<B[i]<<" "<<A[i]<<endl;    
   }
   return 0;
}
int main()
{
 int A,B,C,D,word,weight;
 char rank[6];
for(int j=0;j<6;j++)
 rank[j]='0';
for(A = 1; A<= 5; A++) 
{
 for(B = 1; B<= 5; B++) 
{
 if(A == B) continue;
  for(C = 1; C<= 5; C++)
  {
  if(A == C || B == C) continue;
  for(D =1; D<= 5; D++) 
   {
    if(A == D || B == D || C == D) continue;
   word=((A+B)==(C+D))+((A+D)>(C+B))+((A+C)<B);
  if(word==3)
 {rank[A]='z';
  rank[B]='q';
  rank[C]='s';
  rank[D]='l';
 for(int j=5;j>0;j--)
  {
    if(rank[j]=='0') continue;
     else
      {cout<<rank[j]<<" ";
       weight=j*10;
       cout<<weight<<endl;}
  }}}}}}
return 0;
}
int main()
{
   int Wz,Wq,Ws,Wl,i,j;
   char rank[6];
   for(Wz=1;Wz<=5;Wz++)
   {
      for(Wq=1;Wq<=5;Wq++)
      {
         for(Ws=1;Ws<=5;Ws++)
         {
            for(Wl=1;Wl<=5;Wl++)
            {
               if((Wz+Wq==Ws+Wl)&&(Wz+Wl>Ws+Wq)&&(Wz+Ws<Wq))
               {
                   rank[Wz]='z';
                   rank[Wq]='q';
                   rank[Ws]='s';
                   rank[Wl]='l';
                   for(i=5;i>=1;i--)
                   {
                      if(rank[i]=='\0')
                      continue;
                      else cout<<rank[i]<<' '<<i*10<<endl;
                   }
               }
            }
         }
      }
   }
   return 0;
}
int main()
{
	int z, q, s, l;
	for (z = 10; z<=50; z+=10)
	{
		for(q = 10; q<=50;q+=10)
		{
			for(s=10;s<=50;s+=10)
			{
				for(l=10;l<=50;l+=10)
				{
					int pp1 =((z+q)==(s+l)) ;
					int pp2 = ((z+l)>(s+q));
					int pp3 = ((z+s)<q);
					if ((pp1+pp2+pp3)==3 )
						cout << "l " << l <<'\n'<< "q " << q <<'\n'<< "z " << z <<'\n'<< "s " << s << endl;
				}
			}
		}
	}
	return 0;
}
main()
{
   int z[5],q[5],s[5],l[5],w[4];
   int i,a,b,c,d,j,t;
   char ch[5];
   for(i=0;i<5;i++)
   {
     z[i]=i+1;
     q[i]=i+1;
     s[i]=i+1;
     l[i]=i+1;                
   } 
   for(a=0;a<5;a++)
   {
      for(b=0;b<5;b++)             
      {
         for(c=0;c<5;c++)             
        {
         for(d=0;d<5;d++)
         {
          if(z[a]+q[b]==s[c]+l[d]&&z[a]+l[d]>s[c]+q[b]&&z[a]+s[c]<q[b])
          //{printf("%d %d %d %d\n",a,b,c,d);}
            {w[0]=a;w[1]=b;w[2]=c;w[3]=d;
              ch[a]='z';z[a]=a+1;
   ch[b]='q';q[b]=b+1;
   ch[c]='s';s[c]=c+1;
   ch[d]='l';l[d]=d+1;
            
            
            }
                    
         }
        }            
      }             
   }
   
   
    for(i=0;i<4;i++)
   {
     //printf("%d\n",w[i]);                
   }  
   for(j=0;j<3;j++)
   {
       for(i=0;i<3-j;i++)
       {
        if(w[i]<w[i+1])
        {
           t=w[i];
           w[i]=w[i+1];
           w[i+1]=t;              
        }                  
       }            
   }
    for(i=0;i<4;i++)
   {
    // printf("%d\n",w[i]);                
   }  
   for(i=0;i<4;i++)
   {
      t=w[i];             
     printf("%c %d\n",ch[t],t*10+10);                
   }  
      //printf("%d %d %d %d\n",a,b,c,d);
getchar();
getchar();
getchar();      
}
int main()
{
	int A=0,B=0,C=0;
	char d[6]={'0','0','0','0','0','0'};
	int z=0,q=0,s=0,l=0,i=0;
	for(z=1;z<=5;z++)
	{
		for(q=1;q<=5;q++)
		{
			if(z==q)continue;
			for(s=1;s<=5;s++)
			{
				if(z==s||q==s)continue;
				for(l=1;l<=5;l++)
				{
					A=0;B=0;C=0;
					if(z==l||q==l||s==l)continue;
				
					if((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)<q)
					{
						d[z]='z';
						d[q]='q';
						d[s]='s';
						d[l]='l';

					}
				}
			}
		}
	}
	for(i=5;i>0;i--)
	{
		if(d[i]!='0')cout<<d[i]<<" "<<i*10<<endl;
	}
	return 0;
}
int main()
{
	int z, q, s, l, i, j, t;
	int a[4] = {0};
	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)
					{
						a[0] = z; a[1] = q; a[2] = s; a[3] = l;
						for( i = 0; i < 3; i ++)
						{
							for(j = 0; j < 3- i; j ++)
							{
								if(a[j]  < a[j + 1])
								{
									t = a[j + 1]; a[j + 1] = a[j]; a [j]  = t;
								}
							}
						}
						for(i = 0; i < 4;i ++)
						{
							if(z == a[i]) cout << "z"<< " " << 10 * a[i] << endl;
							if(q == a[i] ) cout << "q"<< " " <<  10 * a[i] << endl;
							if(s == a[i] ) cout << "s"<< " " << 10 * a[i] << endl;
							if(l == a[i] ) cout << "l"<< " " << 10 * a[i] << endl;
						}
					}
				}
	return 0;
}
//??????????????????????????????
//??????????????????????????10?????
//??????????50?????????????????????????????;
//???????????????????????????????????????????
//?????????????????????????????????????????????????
int main()
{

	int z,q,s,l,sum;
    int a1,a2,a3,a4,a5,a6,a7,a8;
    for(z=1;z<=5;z++)
        for(q=1;q<=5;q++)
    	    for(s=1;s<=5;s++)
    		    for(l=1;l<=5;l++)
    		    {
    a1=(z<=5);a2=(q<=5);a3=(s<=5);a4=(l<=5);
    a5=(z+q==s+l);a6=(z+l>s+q);a7=(s+z<q);
    a8=(z!=q && z!=s  &&z!=l &&q!=s &&q!=l &&s!=l );

    sum=a1+a2+a3+a4+a5+a6+a7+a8;

    if (sum==8)
    {

    	int i;

    	for(i=5;i<=5;i=i-1)
    	{
    		 if(i==z)cout<<"z"<<" "<<10*z<<endl;
			 if(i==q)cout<<"q"<<" "<<10*q<<endl;
			 if(i==s)cout<<"s"<<" "<<10*s<<endl;
			 if(i==l)cout<<"l"<<" "<<10*l<<endl;

    	}
    }
    		    }
    return 0;
}
int main()
{
	int z,q,s,l,i;
	char a[5];
	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)
					{
						a[z]='z';
						a[q]='q';
						a[s]='s';
						a[l]='l'-1;
					}
	for(i=5;i>=1;i--)
	{
	    if(a[i]>='a'&&a[i]<='z') cout<<a[i]<<" "<<i*10<<endl;
	}
	return 0;
}
/*
 * ???.cpp
 *
 *  Created on: 2012-10-15
 *      Author: ???
 *      ?????????????????????????????
 */
char max(int x,int y,int z,int w)
{
	char m;
int n;
n=x>y?x:y;
n=n>z?n:z;
n=n>w?n:w;
if (n==x) m='z';
if (n==y) m='q';
if (n==z) m='s';
if (n==w) m='l';//??max???????????????
return(m);
}
int main(){
	int z,q,s,l,i,Z,Q,S,L;
	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)&&(z!=s)&&(z!=l)&&(q!=s)&&(s!=l)
				&&(q!=l)&&(z+q==s+l)&&(z+l>s+q)&&(z+s<q))//?????????????????????
					{	Z=z;
						Q=q;
						S=s;                              //??????????????????????
						L=l;
					for(i=1;i<5;i++)
				     {switch (max(Z,Q,S,L))
				      {case 'z': {cout<<"z "<<Z<<endl;Z=0;break;}
				      case 'q': {cout<<"q "<<Q<<endl;Q=0;break;}
				      case 's': {cout<<"s "<<S<<endl;S=0;break;}
				      case 'l': {cout<<"l "<<L<<endl;L=0;break;}//?????????????
				                                               //?????0?????????????
				      }
				     }
					}
				}
			}
		}
	}
	return 0;
}
int main()
{char str[4];
str[0]='z';str[1]='q';str[2]='s';str[3]='l';
int a=0,b=0,c=0,d=0;
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&&a!=b&&a!=c&&a!=d&&b!=c&&b!=d&&c!=d)
{int s[4]={a,b,c,d};
int i=0,j=0;
for(i=0;i<=2;i++)
for(j=i+1;j<=3;j++)
{if(s[i]<s[j])
{int x=0;
char y;
x=s[i];s[i]=s[j];s[j]=x;
 y=str[i];str[i]=str[j];str[j]=y;}
}
int k=0;
for(k=0;k<=3;k++)
cout<<str[k]<<" "<<10*s[k]<<endl;}
cout<<endl;

	return 0;
}
/*
 *100030.cpp
 *???????
 *Created on: 2012-10-13
 *Author:??
 */
int z=0,q=0,s=0,l=0,c=0,a[10],i=0,j=0;
char m[5];
char d;
int main (){
	for(z=1;z<6;z++)//????
	{
		for(q=1;q<6;q++)
		{
			if(z!=q)
			{
				for(s=1;s<6;s++)
				{
					if((z!=s)&&(q!=s))
					{
						for(l=1;l<6;l++)
						{
							if((z!=l)&&(q!=l)&&(s!=l))
							{
								if(((z+q)==(s+l))&&((z+l)>(s+q))&&((z+s)<(q)))
								{
									a[0]=z,a[1]=q,a[2]=s,a[3]=l;
									m[0]='z';m[1]='q';m[2]='s';m[3]='l';
									for(i=0;i<3;i++){//?????
										for(j=0;j<(3-i);j++){
											if (a[j]>a[j+1]){
												c=a[j];
												a[j]=a[j+1];
												a[j+1]=c;
												d=m[j];
												m[j]=m[j+1];
												m[j+1]=d;
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	cout<<m[3]<<' '<<a[3]*10<<endl;//?????
	cout<<m[2]<<' '<<a[2]*10<<endl;
	cout<<m[1]<<' '<<a[1]*10<<endl;
	cout<<m[0]<<' '<<a[0]*10<<endl;
	return 0;
}
//???
int main()
{
	int Z = 0, Q = 0, S = 0, L = 0, i = 0;
	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) == 3)
					{
						for (i = 5; i >= 1; i--)
						{
							if(i == Z)
								cout << "z " << 10 * i << endl;
							else if(i == Q)
								cout << "q " << 10 * i << endl;
							else if(i == S)
								cout << "s " << 10 * i << endl;
							else if (i == L)
								cout << "l " << 10 * i << endl;
						}
						break;
					}
				}
				return 0;
}
int main()
{
	int z, q, s, l;

	for(z = 10; z <= 50; z += 10)
	for(q = 10; q <= 50; q += 10)
	for(s = 10; s <= 50; s += 10)
	for(l = 10; l <= 50; l += 10)
	if(z + q == s + l && z + l > s +q && z + s < q)
	{
					
		cout << "l " << l << endl;
		cout << "q " << q << endl;
		cout << "z " << z << endl;
		cout << "s " << s << endl;

	}

	return 0 ;
}
int main()
{
  int a[5],i,j,t;
  char c[5],d;
  c[1]='z';
  c[2]='q';
  c[3]='s';
  c[4]='l';
  for(a[2]=4;a[2]<6;a[2]++)
  {
     for(a[1]=1;a[1]<a[2]-1;a[1]++)
	 {
		 for(a[3]=1;a[3]<a[2]-a[1];a[3]++)
		 {
			 c[1]='z';
             c[2]='q';
             c[3]='s';
             c[4]='l';
		   if(a[3]==a[1]) continue;
		   else
		   {
			   a[4]=a[1]+a[2]-a[3];
			 
			 if(a[4]==a[2]||a[4]==a[3]||a[4]==a[1]) continue;
			 else if(a[1]+a[4]>a[2]+a[3]&&a[4]>0&&a[4]<6)
			 {
			    for(i=1;i<4;i++)
				{
					for(j=4;j>i;j--)
					{
					   if(a[i]<a[j])
					   {
					   t=a[i];a[i]=a[j];a[j]=t;
					   d=c[i];c[i]=c[j];c[j]=d;
					   }
					}
				}
			 for(i=1;i<5;i++)
			 {
			 cout<<c[i]<<' '<<a[i]*10<<endl;
			 
			 }
			 }
			 
			 
		   
		   }
		 }
	 }
	 break; }                                          //??????????break?????????l,q,z,s???

return 0;

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

{
    int z, q, s, l, x1, x2, x3, x4;
    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))
                       {
                           if(q > l)
                           {
                                cout << "q " << q << endl;
                                cout << "l " << l << endl;
                                cout << "s " << s << endl; 
                                cout << "z " << z << endl;
                           }
                           else
                           {
                                cout << "l " << l << endl;
                                cout << "q " << q << endl;
                                cout << "z " << z << endl; 
                                cout << "s " << s << endl;
                           }
                       }
                  }
             }
        }
    }
    return 0;
}
/*
 * chengtizhong.cpp
 *
 *  Created on: 2012-10-18
 *      Author: ??
 *      description????????????????????????????????????????????
 *      ?????????????10???????????????50?????????????????????????????;
 *      ?????????????????????????????????????????????????????????????
 *      ???????????????????????????????
 */
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)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l))
    					 if(  ((z+q)==(s+l))  && ((z+l)>(s+q))  &&  ((z+s)<q)     )//???????????
    					 {
    						 if(z==5)cout<<"z 50"<<endl;
    						 if(q==5)cout<<"q 50"<<endl;
    						 if(s==5)cout<<"s 50"<<endl;
    						 if(l==5)cout<<"l 50"<<endl;
    						 if(z==4)cout<<"z 40"<<endl;
    						 if(q==4)cout<<"q 40"<<endl;
    						 if(s==4)cout<<"s 40"<<endl;
    						 if(l==4)cout<<"l 40"<<endl;
    						 if(z==3)cout<<"z 30"<<endl;
    						 if(q==3)cout<<"q 30"<<endl;
    						 if(s==3)cout<<"s 30"<<endl;
    						 if(l==3)cout<<"l 30"<<endl;
    						 if(z==2)cout<<"z 20"<<endl;
    						 if(q==2)cout<<"q 20"<<endl;
    						 if(s==2)cout<<"s 20"<<endl;
    						 if(l==2)cout<<"l 20"<<endl;
    						 if(z==1)cout <<"z 10" << endl;
    			             if (q==1) cout <<"q 10" << endl;
    						 if (s==1) cout <<"s 10" << endl;
    						 if (l==1) cout <<"l 10" << endl;//?????????
    					 }

    			 }
     return 0;
}
int main()
{
 int a,b,c,d,m,n,i;
 for(a=10;a<=50;a=a+10)
	 for(b=10;b<=50;b=b+10)
		 if(a==b)continue;
         else for(c=10;c<=50;c=c+10)
			 if(a==c||c==b)
				 continue;
			 else for(d=10;d<=50;d=d+10)
				 if(a==d||b==d||c==d)
					 continue;
				 else if(a+b==c+d&&a+d>b+c&&a+c<b)
					 for(i=50;i>=10;i=i-10)
					 {
						 if(a==i)
							 cout<<"z "<<a<<endl;
						 if(b==i)
							 cout<<"q "<<b<<endl;
						 if(c==i)
							 cout<<"s "<<c<<endl;
						 if(d==i)
							 cout<<"l "<<d<<endl;
					 }
}
int main() {
	int z,q,s,l,x;
	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)
				{x=(((z+q)==(s+l))+((z+l)>(s+q))+((z+s)<q));
				if(x==3) {
				if((z>q)&&(q>s)&&(s>l))cout <<"z"<<" "<<z<<endl <<"q"<<" "<<q<<endl<<"s"<<" "<<s<<endl<<"l"<<" "<<l;
				if((z>q)&&(q>l)&&(l>s))cout <<"z"<<" "<<z<<endl <<"q"<<" "<<q<<endl<<"l"<<" "<<l<<endl<<"s"<<" "<<s;
				if((z>s)&&(s>l)&&(l>q))cout <<"z"<<" "<<z<<endl <<"s"<<" "<<s<<endl<<"l"<<" "<<l<<endl<<"q"<<" "<<q;
				if((z>s)&&(s>q)&&(q>l))cout <<"z"<<" "<<z<<endl <<"s"<<" "<<s<<endl<<"q"<<" "<<q<<endl<<"l"<<" "<<l;
				if((z>l)&&(l>s)&&(s>q))cout <<"z"<<" "<<z<<endl <<"l"<<" "<<l<<endl<<"s"<<" "<<s<<endl<<"q"<<" "<<q;
				if((z>l)&&(l>q)&&(q>s))cout <<"z"<<" "<<z<<endl <<"l"<<" "<<l<<endl<<"q"<<" "<<q<<endl<<"s"<<" "<<s;
				if((q>z)&&(z>s)&&(s>l))cout <<"q"<<" "<<q<<endl <<"z"<<" "<<z<<endl<<"s"<<" "<<s<<endl<<"l"<<" "<<l;
				if((q>z)&&(z>l)&&(l>s))cout <<"q"<<" "<<q<<endl <<"z"<<" "<<z<<endl<<"l"<<" "<<l<<endl<<"s"<<" "<<s;
				if((q>s)&&(s>z)&&(z>l))cout <<"q"<<" "<<q<<endl <<"s"<<" "<<s<<endl<<"z"<<" "<<z<<endl<<"l"<<" "<<l;
				if((q>s)&&(s>l)&&(l>z))cout <<"q"<<" "<<q<<endl <<"s"<<" "<<s<<endl<<"l"<<" "<<l<<endl<<"z"<<" "<<z;
				if((q>l)&&(l>z)&&(z>s))cout <<"q"<<" "<<q<<endl <<"l"<<" "<<l<<endl<<"z"<<" "<<z<<endl<<"s"<<" "<<s;
				if((q>l)&&(l>s)&&(s>z))cout <<"q"<<" "<<q<<endl <<"l"<<" "<<l<<endl<<"s"<<" "<<s<<endl<<"z"<<" "<<z;
				if((s>z)&&(z>q)&&(q>l))cout <<"s"<<" "<<s<<endl <<"z"<<" "<<z<<endl<<"q"<<" "<<q<<endl<<"l"<<" "<<l;
				if((s>z)&&(z>l)&&(l>q))cout <<"s"<<" "<<s<<endl <<"z"<<" "<<z<<endl<<"l"<<" "<<l<<endl<<"q"<<" "<<q;
				if((s>q)&&(q>z)&&(z>l))cout <<"s"<<" "<<s<<endl <<"q"<<" "<<q<<endl<<"z"<<" "<<z<<endl<<"l"<<" "<<l;
				if((s>q)&&(q>l)&&(l>z))cout <<"s"<<" "<<s<<endl <<"q"<<" "<<q<<endl<<"l"<<" "<<l<<endl<<"z"<<" "<<z;
				if((s>l)&&(l>z)&&(z>q))cout <<"s"<<" "<<s<<endl <<"l"<<" "<<l<<endl<<"z"<<" "<<z<<endl<<"q"<<" "<<q;
				if((s>l)&&(l>q)&&(q>z))cout <<"s"<<" "<<s<<endl <<"l"<<" "<<l<<endl<<"q"<<" "<<q<<endl<<"z"<<" "<<z;
				if((l>z)&&(z>q)&&(q>s))cout <<"l"<<" "<<l<<endl <<"z"<<" "<<z<<endl<<"q"<<" "<<q<<endl<<"s"<<" "<<s;
				if((l>z)&&(z>q)&&(s>q))cout <<"l"<<" "<<l<<endl <<"z"<<" "<<z<<endl<<"s"<<" "<<s<<endl<<"q"<<" "<<q;
				if((l>q)&&(q>z)&&(z>s))cout <<"l"<<" "<<l<<endl <<"q"<<" "<<q<<endl<<"z"<<" "<<z<<endl<<"s"<<" "<<s;
				if((l>q)&&(q>s)&&(s>z))cout <<"l"<<" "<<l<<endl <<"q"<<" "<<q<<endl<<"s"<<" "<<s<<endl<<"z"<<" "<<z;
				if((l>s)&&(s>z)&&(z>q))cout <<"l"<<" "<<l<<endl <<"s"<<" "<<s<<endl<<"z"<<" "<<z<<endl<<"q"<<" "<<q;
				if((l>s)&&(s>q)&&(q>z))cout <<"l"<<" "<<l<<endl <<"s"<<" "<<s<<endl<<"q"<<" "<<q<<endl<<"z"<<" "<<z;
				return 0;}}}}}
}
int main()
{
	int i,j,k,l,z,q,s,l1;
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			if(j == i)
				continue;
			for(k=1;k<=5;k++)
			{
				if(k ==j || k == i)
					continue;
				for(l1=1;l1<=5;l1++)
				{
					if(l1 == k || l1 == j || l1 == i)
						continue;//??????????????????????
					if((i+j)==(k+l1) && (i+l1)>(k+j) && (i+k)<j)
					{
						z=i;
						q=j;
						s=k;
						l=l1;//?????????????????
					}
				}
			}
		}
	}
	char ch[4]={0};
	ch[0]='z';
	ch[1]='q';
	ch[2]='s';
	ch[3]='l';
	int a[4]={0};
	a[0]=z;
	a[1]=q;
	a[2]=s;
	a[3]=l;//???????????????????
	int x,y,t1,t2;
	for(x=0;x<3;x++)
		for(y=0;y<3-x;y++)
			if(a[y]<a[y+1])
			{t1=a[y];a[y]=a[y+1];a[y+1]=t1;t2=ch[y];ch[y]=ch[y+1];ch[y+1]=t2;}//??????????????????
    for(i=0;i<4;i++)
	cout<<ch[i]<<" "<<a[i]*10<<'\n'<<endl;//???????????????
	return 0;
}
int main()
{
	int wei[5],i,j,temp;
	char name[5]={' ','z','q','s','l'};
	for(wei[1]=10;wei[1]<=50;wei[1]+=10)
	{
		for(wei[2]=10;wei[2]<=50;wei[2]+=10)
		{
			if(wei[2]!=wei[1])
			{
				for(wei[3]=10;wei[3]<=50;wei[3]+=10)
				{
					if(wei[3]!=wei[1]&&wei[3]!=wei[2])
					{
						for(wei[4]=10;wei[4]<=50;wei[4]+=10)
						{
							if(wei[4]!=wei[1]&&wei[4]!=wei[2]&&wei[4]!=wei[3])
							{
								if(wei[1]+wei[2]==wei[3]+wei[4]&&wei[1]+wei[4]>wei[2]+wei[3]&&wei[1]+wei[3]<wei[2])
								{
									for(j=50;j>=10;j-=10)
									{
										for(temp=1;temp<=4;temp++)
										{
											if(wei[temp]==j)
												cout<<name[temp]<<" "<<wei[temp]<<endl;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}