semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()                                   //???
{                                            //?????
	int z=0,q=0,s=0,l=0,i=0,j=0,k=0,m=0,n=0,x=0;    
         //?????z,q,s,l???????????
	for(i=1;i<=5;i++)                   //?????,???????
	{
		z=10*i;
		for(j=1;j<=5;j++)
		{
			q=10*j;
			if(q==z)
                                    continue;
			for(k=1;k<=5;k++)
			{
				s=10*k;
				if(s==z||s==q)
			          	continue;
				for(m=1;m<=5;m++)
				{
				         l=10*m;
					if(l==z||l==q||l==s)
					         continue;
					if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))                //????????          
					{
						for(n=5;n>=1;n--)                       //?????,?????????
						{
							x=n*10;
							if(z==x)
							{
	
         cout<<"z "<<x<<endl;
							}
                                                                else if(q==x)
							{
								cout<<"q "<<x<<endl;
							}
                                                                else if(s==x)
							{
								cout<<"s "<<x<<endl;
							}
                                                                else if(l==x)
							{
								cout<<"l "<<x<<endl;
							}
						}
					}
				}
			}
		}
	}//?????,??,??????????grids?????           
	return 0;
}
//********************************************************
//*  ???:8.cpp                                        *
//*  ??????    1200012948                          *
//*  ????: 2012 10 17                                *
//*  ????:???                                     *
//********************************************************
int main()
{
	int z,q,s,l,z1,q1,s1,l1,i;
	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 != s)&&(z != q)&& (z != l)&& (s != q)&&(s != l) && (q != l))
					{
					    z1 = z;
					    q1 = q;
					    s1 = s;
					    l1 = l;
					}


				}
	for(i = 5; i >= 1; i--)
	{
		if(z1==i)
			cout << "z " << z1*10 << '\n';
		if(q1==i)
		    cout << "q " << q1*10 << '\n';
		if(s1==i)
		    cout << "s " << s1*10 << '\n';
		if(l1==i)
		    cout << "l " << l1*10 << '\n';
	}
	return 0;
}
//???


int main()
{
    int a[4], max[4] = {0,0,0,0};
    char A[4] = {'z','q','s','l'} , Max[4];
    for(a[0] = 10 ; a[0] <= 50 ; a[0] = a[0] + 10)
    {
        for(a[2] = 10 ; a[2] <=50 ; a[2] = a[2] + 10)
        {
            for(a[3] = 10 ; a[3] <= 50 ; a[3] = a[3]+ 10)
            {
                a[1] = a[2] + a[3] - a[0];
                if(a[0] + a[3] > a[1] + a[2] && a[0] + a[2] < a[1])
                {
                    for(int i1 = 0 ; i1 <= 3 ; i1++)
                    {
                        if(a[i1]>max[0])
                        {
                            max[0] = a[i1];
                            Max[0] = A[i1];
                        }
                    }
                    for(int i2 = 0 ; i2 <= 3 ; i2++)
                    {
                        if(a[i2] > max[1] && a[i2] < max[0])
                        {
                            max[1] = a[i2];
                            Max[1] = A[i2];
                        }
                    }
                    for(int i3 = 0 ; i3 <= 3 ; i3++)
                    {
                        if(a[i3] > max[2] && a[i3] < max[1])
                        {
                            max[2] = a[i3];
                            Max[2] = A[i3];
                        }
                    }
                    for(int i4 = 0 ; i4 <= 3 ; i4++)
                    {
                        if(a[i4] > max[3] && a[i4] < max[2])
                        {
                            max[3] = a[i4];
                            Max[3] = A[i4];
                        }
                    }
                    for(int i5 = 0 ; i5 <= 3 ; i5++)
                    {
                        cout<<Max[i5]<<" "<<max[i5]<<endl;
                    }
                }
            }
        }
    }

    return 0;
}
int w[4];
char c[4];
void work(int p)
{
	if (p == 4)
	{
		if ((w[0] + w[1] == w[2] + w[3])&&(w[0] + w[3] > w[1] + w[2])&&(w[0] + w[2] < w[1]))
		for (int i = 50; i >= 10; i--) for (int j = 0; j < 4; j++) if (w[j] == i) cout << c[j] << ' ' << i << endl;
		return;
	}
	for (int i = 10; i <= 50; i += 10)
	{
		w[p] = i;
		work(p + 1);
	}
}
int main()
{
	c[0] = 'z';
	c[1] = 'q';
	c[2] = 's';
	c[3] = 'l';
	work(0);
	return 0;
}
int main()
{
	int z,q,s,l;
	for (int i=1;i<=5;i++)
	{
		z=10*i;
		for (int j=1;j<=5;j++)
		{
			q=10*j;
			for (int k=1;k<=5;k++)
			{
				s=10*k;
				for (int t=1;t<=5;t++)
				{
					l=10*t;
					if ((z+s)<q && (z+l)>(s+q) && (z+q)==(s+l))
					{
						cout<<"l "<<l<<endl;
						cout<<"q "<<q<<endl;
						cout<<"z "<<z<<endl;
						cout<<"s "<<s<<endl;
					}
				}
			}
		}
	}
	return 0;
}
/*
 *  Name: tizhong.cpp
 *
 *  Created on: 2012-10-16
 *  Author: 00948343_??
 *  Function????
 */



int main(){ 
	int z,q,s,l;                                  //??????????
	for (z=10;z<=50;z=z+10){                      //?????????????????
		for (q=10;q<=50;q=q+10){
			if (q!=z){
				for (s=10;s<=50;s=s+10){
					if ((s!=z)&&(s!=q)){
						for (l=10;l<=50;l=l+10){
							if ((l!=s)&&(l!=z)&&(l!=q)){
								if ((l+s-z==q)&&(z+l-s>q)&&(z+s<q)){        //????????????????
									for (int i=50;i>0;i=i-10){
										if (i==z){
											cout << "z " << i << endl;
										}
										else if (i==q){
											cout << "q " << i << endl;
										}
										else if (i==s){
											cout << "s " << i << endl;
										}
										else if (i==l){
											cout << "l " << i << endl;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
/*
 * Weight.cpp
 *
 *  Created on: 2012-10-24
 *  Author: ??
 *  ???????????????????????????????????????????????????????????10???????????????50?????????????????????????????; ????????????????????????????????????????????????????????????????????????????????????????????
 */

//?????

int main() {
	int a[4] = { 10, 10, 10, 10 }; //??????
	char b[4] = { 'z', 'q', 's', 'l' }; //??????
	int p = 0; //???????
	char q1; //???????
	for (a[0] = 10; a[0] <= 50; a[0] = a[0] + 10) {
		for (a[1] = 10; a[1] <= 50; a[1] = a[1] + 10) {
			for (a[2] = 10; a[2] <= 50; a[2] = a[2] + 10) {
				for (a[3] = 10; a[3] <= 50; a[3] = a[3] + 10) {

					if (a[1] != a[2] && a[1] != a[3] && a[1] != a[0] && a[2]
							!= a[3] && a[2] != a[0] && a[3] != a[0]) {

						if (a[0] + a[1] == a[2] + a[3] && a[0] + a[3] > a[2]
								+ a[1] && a[0] + a[2] < a[1]) //????
						{
							for (int j = 1; j <= 3; j++) //????
							{
								for (int k = 0; k < 4 - j; k++) {
									if (a[k] < a[k + 1]) {
										p = a[k + 1];
										a[k + 1] = a[k];
										a[k] = p; //??a[k]?a[k+1]???
										q1 = b[k + 1];
										b[k + 1] = b[k];
										b[k] = q1; //??b[k]?b[k+1]???
									}
								}
							}
							for (int l = 0; l < 4; l++) {
								cout << b[l] << " " << a[l] << endl; //????
							}
							return 0;
						}
					}
				}
			}

		}
	}

	return 0; //??
}
int main() {
	int z1,q1,s1,l1, z, q, s, l;
	for ( z = 10; z <= 50; z += 10) {
		for ( q = 10; q != z,q <= 50; q += 10) {
			for ( s = 10;s != z,s != q,s <= 50; s += 10) {
				for ( l = 10;l != z,l != q,l != s,l <= 50; l += 10) {
					if ( z + q == s + l && z + l > s + q && z + s < q ) {
						z1 = z;
						q1 = q;
						s1 = s;
						l1 = l;
					}
				}
			}
		}
	}
	for ( int i = 50; i >= 10; i --) {
		if ( z1 == i) cout << "z" << " " << i << endl;
		if ( q1 == i) cout << "q" << " " << i << endl;
		if ( s1 == i) cout << "s" << " " << i << endl;
		if ( l1 == i) cout << "l" << " " << i << endl;
	}
	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;
			else
			{
				for(s=10;s<50;s=s+10)
				{
					if((s==z)||(s==q))
						continue;
					else
					{
						for(l=10;l<=50;l=l+10)
							{
								if((l==z)||(l==q)||(l==s))
									continue;
								else
								{
									if((z+q==s+l)&&(z+l>s+q)&&(q>z+s))
									{
										for(int i=50;i>0;i=i-10)
										{
											if(z==i)
												cout<<"z"<<" "<<z<<endl;
											if(q==i)
												cout<<"q"<<" "<<q<<endl;
											if(s==i)
												cout<<"s"<<" "<<s<<endl;
											if(l==i)
												cout<<"l"<<" "<<l<<endl;
										}
									}
								}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int z0=1,q0=1,s0=1,l0=1,t=0,k=0,c=0,z1,q1,s1,l1,a[4][2];
    char b[4];
    char z,q,s,l;
    for(z0=1;z0<=5;z0++)
    {
        for(q0=1;q0<=5;q0++)
        {
            for(s0=1;s0<=5;s0++)
            {
                for(l0=1;l0<=5;l0++)
                {
                    if((z0+q0)==(s0+l0)) t=1;
                    else continue;
                    if((z0+l0)>(s0+q0)) k=1;
                    else continue;
                    if((z0+s0)<q0) c=1;
                    else continue;
                    if(t*k*c==1) 
                    {
                        z1=10*z0;
                        q1=10*q0;
                        s1=10*s0;
                        l1=10*l0;
                        break;
                    }
                }
            }
        }
    }
    a[0][0]=z1;
    a[0][1]='z';
    a[1][0]=q1;
    a[1][1]='q';
    a[2][0]=s1;
    a[2][1]='s';
    a[3][0]=l1;
    a[3][1]='l';
    for(int i=0;i<4;i++)
    {
        for(int j=i;j<4;j++)
        {
            if(a[i][0]<a[j][0])
            {
               swap(a[i][0],a[j][0]);
               swap(a[i][1],a[j][1]);
            }
        }
    }
   for(int k=0;k<4;k++)
   {
        b[k]=a[k][1];
        cout<<b[k]<<" "<<a[k][0]<<endl;
    }
    return 0;
}
int main()
{
    int a,b,c,d;
    a=20;
    b=40;
    c=10;
    d=50;
    printf("l %d\nq %d\nz %d\ns %d",d,b,a,c);

    return 0;
}
int main()
{
	int z,q,s,l,m=0,n=0,g=0,i,j,a,b;
	for(i=1;i<=5;i++)
	{
		z=i*10;
		for(j=1;j<=5;j++)
		{
			q=j*10;
			for(a=1;a<6;a++)
			{
				s=a*10;
				for(b=1;b<6;b++)
				{
					l=b*10;
					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;
						m=1;
						break;
					}
				}
				if(m==1)
				{
					n=1;
					break;
				}
			}
			if(n==1)
			{
				g=1;
				break;
			}
		}
		if(g==1)
			break;
	}
	return 0;
}
int a[4];
char name[]={'z','q','s','l'};
int main(){
	int z,q,s,l;
	for(z = 10;z <= 50; z += 10){
		for(q = 10;q <= 50; q += 10){
			if(q == z)	continue;
			for(s = 10;s <= 50; s += 10){
				if(s == z || s == q)	continue;
				for(l = 10;l <= 50; l += 10){
					if(l == z || l == q || l == s)	continue;
					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(int i = 50;i > 0;i -= 10){
							for(int j = 0;j < 4;j ++){
								if(a[j] == i)
									cout << name[j] << ' ' << i << endl;
							}
						}
						return 0;
					}
				}
			}
		}
	}
	return 0;
}
main()
{
int a,b,c,d,i,j,t;
static int x[5];
char k;
 char y[5]={'\0','z','q','s','l'};
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&&a!=b&&b!=c&&c!=d)
        {x[1]=a;
         x[2]=b;
         x[3]=c;
         x[4]=d;}
for(j=1;j<=3;j++)
  for(t=j+1;t<=4;t++)
   if(x[j]<x[t])
    {i=x[j];
     x[j]=x[t];
     x[t]=i;
     k=y[j];
     y[j]=y[t];
     y[t]=k;}
for(i=1;i<=4;i++)
   printf("%c %d\n",y[i],x[i]);
}
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 i;
	char name[4]={'l','q','z','s'};        //???????
         int a[4]={50,40,20,10};                //????????
	for(i=0;i<4;i++)                       //???????
		cout<<name[i]<<' '<<a[i]<<endl;
	return 0;
}
int main()
{
	int z=1,q=1,s=1,l=1;
	int sa,sb,sc;
	if (z+q==s+l) sa=1;
	if (z+l>s+q) sb=1;
	if (z+s<q); sc=1;
			   cout<<"l"<<" "<<"50"<<endl;
	           cout<<"q"<<" "<<"40"<<endl;
			   cout<<"z"<<" "<<"20"<<endl;
			   cout<<"s"<<" "<<"10"<<endl;
			   return 0;
}
/*
 * hw20130927(8.cpp
 *?????????
 *???????????????????????????????????????????
 *?????????????10???????????????50????????????
 *?????????????????; ????????????????????????
 *??????????????????????????????????????????
 *??????????????????????????
 *  Created on: 2013-9-29
 *      Author: KyLin
 */
int main ()
{
	int zhao,qian,sun,li;     //???????????
	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))     //????????
					{
						zhao=z*10;
						qian=q*10;
						sun=s*10;
						li=l*10;
					}
	const int z1=zhao,q1=qian,s1=sun,l1=li;         //??????
	while (zhao<60||qian<60||sun<60||li<60)
	{
		zhao+=10;                            //???60??????????
		qian+=10;
		sun+=10;
		li+=10;
		if (zhao==60)
			cout<<"z "<<z1<<endl;
		if (qian==60)
			cout<<"q "<<q1<<endl;
		if (sun==60)
			cout<<"s "<<s1<<endl;
		if (li==60)
			cout<<"l "<<l1<<endl;
	}
	return 0;
}
int main()
{
	int z,q,s,l;
	for(z=10;z<=50;z+=10)
	{
		for(q=10;q<=50;q+=10)
		{
			if(q==z)continue;
			else
			{
				for(s=10;s<=50;s+=10)
				{
					if(s==z||s==q)continue;
					else
					{
						for(l=10;l<=50;l+=10)
						{
							if(l==z||l==q||l==s)continue;
							else
							{
								if((z+q==s+l)&&(z+l>s+q)&&(q>z+s))
									for(int j=50;j>=10;j-=10)
									{
										if(z==j)cout<<'z'<<' '<<j<<endl;
										else if(q==j)cout<<'q'<<' '<<j<<endl;
										else if(s==j)cout<<'s'<<' '<<j<<endl;
										else if(l==j)cout<<'l'<<' '<<j<<endl;
									}
							}
						}
					}
				}
			}
		}
	}
	
	return 0;
}
/*
 *???????.cpp
 *?????
 *????: 2012-10-16
 *?????????????????????????????????????????????????
 */


int main(){
	int Zw,Qw,Sw,Lw,i;						//?????????????Zw,Qw,Sw,Lw,????i
	for(Zw=10;Zw<=50;Zw=Zw+10)				//for??
    for(Qw=10;Qw<=50;Qw=Qw+10)				//for??
		{
			if(Zw==Qw)						//?????
				continue;					//????
			for(Sw=10;Sw<=50;Sw=Sw+10)		//for??
			{
				if(Zw==Sw||Qw==Sw)			//?????
					continue;				//????
				for(Lw=10;Lw<=50;Lw=Lw+10)	//for??
				{
					if(Zw==Lw||Qw==Lw||Sw==Lw)//?????
						continue;			//????

					if(Zw+Qw==Sw+Lw)		//?????
					{
						if(Zw+Lw>Sw+Qw)     //????
						{
							if(Zw+Sw<Qw)    //????
							{
								for (i=50;i>=10;i=i-10)//for??
								{
									if(Zw==i)
										cout<<"z "<<i<<endl;		//??????????????????
									if(Qw==i)
										cout<<"q "<<i<<endl;		//??????????????????
									if(Sw==i)
										cout<<"s "<<i<<endl;		//??????????????????
									if(Lw==i)
										cout<<"l "<<i<<endl;		//??????????????????
								}
							}
						}
					}
				}
			}
	   }
				return 0;			//????
}
int main()
{
	char a[4] = {'z', 'q', 's', 'l'}, d;
	int b[4] = {0}, c[4] = {0}, i, j, p, e, x;
	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]++) 
				{
					p = 0;
					for (i = 0; i < 3; i++)
						for(j = i + 1; j < 4; j++)
							if (b[i] == b[j])
							{
								p = 1;
								break;
							}
					
					if (p == 1)
						continue;
					if (((b[0] + b[1]) == (b[2] + b[3])) && ((b[0] + b[3]) > (b[2] + b[1])) && ((b[0] + b[2]) < b[1]))
					{
						for(i = 0; i < 4; i++)
							c[i] = b[i];
						break;
					}
				}
	for (i = 0; i < 3; i++)
	{
		x = i;
		for (j = i + 1; j < 4; j++)
			if (c[x] < c[j])
			{
				e = c[x];
				c[x] = c[j];
				c[j] = e;
				d = a[x];
				a[x] = a[j];
				a[j] = d;
			}
	}
	for (i = 0; i < 4; i++)
		cout << a[i] << ' ' << c[i] * 10 << endl;
	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 (q != z) for (s = 10; s <= 50; s = s + 10)
		{
			if ((s != z) && (s != q)) for (l = 10; l <= 50; l = l + 10)
			{
				if ((l != z) && (l != q) && (l != s))
				{
					if (((z + q) == (s + l)) && ((z + l) > (s + q)) && ((z + s) < q))
					{
						if (z == 50) cout << "z 50" << endl;
						if (q == 50) cout << "q 50" << endl;
						if (s == 50) cout << "s 50" << endl;
						if (l == 50) cout << "l 50" << endl;
						if (z == 40) cout << "z 40" << endl;
						if (q == 40) cout << "q 40" << endl;
						if (s == 40) cout << "s 40" << endl;
						if (l == 40) cout << "l 40" << endl;
						if (z == 30) cout << "z 30" << endl;
						if (q == 30) cout << "q 30" << endl;
						if (s == 30) cout << "s 30" << endl;
						if (l == 30) cout << "l 30" << endl;
						if (z == 20) cout << "z 20" << endl;
						if (q == 20) cout << "q 20" << endl;
						if (s == 20) cout << "s 20" << endl;
						if (l == 20) cout << "l 20" << endl;
						if (z == 10) cout << "z 10" << endl;
						if (q == 10) cout << "q 10" << endl;
						if (s == 10) cout << "s 10" << endl;
						if (l == 10) cout << "l 10" << endl;
					}
				}
			}
		}
	}
	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)
			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)
					{
						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[5]={0},amiddle;
	char b[5],bmiddle;
	int i,j;
	for(z=1;z<6;z++)   
	{
		for(q=1;q<6;q++)
		{
			if(q!=z)
			{
				for(s=1;s<6;s++)
				{
					if((s!=z)&&(s!=q))
					{
						for(l=1;l<6;l++)
						{
							if((l!=z)&&(l!=q)&&(l!=s))
							{
								if(((z+q-s-l)==0)&&(z+l>s+q)&&(z+s<q))
								{
									a[1]=z;b[1]='z';
									a[2]=q;b[2]='q';
									a[3]=s;b[3]='s';
									a[4]=l;b[4]='l';
									for(i=1;i<5;i++)
									{
										for(j=i+1;j<5;j++)
										{
											if(a[i]<a[j])
											{
												amiddle=a[i];
												a[i]=a[j];
												a[j]=amiddle;
												bmiddle=b[i];
												b[i]=b[j];
												b[j]=bmiddle;
											}
										}
									}
									break;
								}}}}}}}}
	for(i=1;i<5;i++)
		cout<<b[i]<<' '<<a[i]<<'0'<<endl;
	return 0;
}
int main()
{
	int z,q,s,l,i;
	int word[4];
	char rank[5];
	for(z=1;z<=5;z++)
		for(q=1;q<=5;q++)
		{if(q==z)continue;
			for(s=1;s<=5;s++)
			{if(s==z||s==q)continue;
				for(l=1;l<=5;l++)
				{
					if(l==z||l==q||l==s)continue;
					word[1]=(z+q)==(s+l);
					word[2]=(z+l)>(s+q);
					word[3]=(z+s)<q;
					rank[z]='z';
					rank[q]='q';
					rank[s]='s';
					rank[l]='l';
					if((word[1]+word[2]+word[3])==3)
					{
						for(i=5;i>=1;i--)
						{if(i==z)
							cout<<rank[z]<<" "<<z*10<<endl;
						else if(i==q)
							cout<<rank[q]<<" "<<q*10<<endl;
						else if(i==s)
							cout<<rank[s]<<" "<<s*10<<endl;
						else if(i==l)
							cout<<rank[l]<<" "<<l*10<<endl;
						else continue;
						}


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



				}
			}
		}
	}
	return 0;
}
int main()

{
	int z=1,q=1,s=1,l=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&&z+s<q&&z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)
						cout<<"l"<<' '<<l*10<<'\n'<<"q"<<' '<<q*10<<endl<<"z"<<' '<<z*10<<'\n'<<"s"<<' '<<s*10<<'\n';
			}
		}
	}
	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&&(z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)<q)
					{
						if(z==50)cout<<"z"<<' '<<50<<endl;
						if(q==50)cout<<"q"<<' '<<50<<endl;
						if(s==50)cout<<"s"<<' '<<50<<endl;
						if(l==50)cout<<"l"<<' '<<50<<endl;
						if(z==40)cout<<"z"<<' '<<40<<endl;
						if(q==40)cout<<"q"<<' '<<40<<endl;
						if(s==40)cout<<"s"<<' '<<40<<endl;
						if(l==40)cout<<"l"<<' '<<40<<endl;
						if(z==30)cout<<"z"<<' '<<30<<endl;
						if(q==30)cout<<"q"<<' '<<30<<endl;
						if(s==30)cout<<"s"<<' '<<30<<endl;
						if(l==30)cout<<"l"<<' '<<30<<endl;
						if(z==20)cout<<"z"<<' '<<20<<endl;
						if(q==20)cout<<"q"<<' '<<20<<endl;
						if(s==20)cout<<"s"<<' '<<20<<endl;
						if(l==20)cout<<"l"<<' '<<20<<endl;
						if(z==10)cout<<"z"<<' '<<10<<endl;
						if(q==10)cout<<"q"<<' '<<10<<endl;
						if(s==10)cout<<"s"<<' '<<10<<endl;
						if(l==10)cout<<"l"<<' '<<10<<endl;
					}
				}
	return 0;
}
int main()
{
	int z,q,s,l;
	int a[4],b[4],c[4],i;
	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)&&(z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l))//????
	{a[0]=z;a[1]=q;a[2]=s;a[3]=l;}}}}}//??????
	for(i=0;i<=3;i++) b[i]=a[i];//?????? ???????????? 
	sort(&a[0],&a[0]+4);//??????
	for(i=0;i<=3;i++) {c[i]=a[3-i];}//??????
    for(i=0;i<=3;i++) 
	{if(c[i]==b[0]) cout<<"z"<<" "<<c[i]<<endl;
     if(c[i]==b[1]) cout<<"q"<<" "<<c[i]<<endl;
	 if(c[i]==b[2]) cout<<"s"<<" "<<c[i]<<endl;//????????
	 if(c[i]==b[3]) cout<<"l"<<" "<<c[i]<<endl;}//????????????
	return 0;
}