semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int A,B,C,D,E;
	for(A=1;A<=5;A++)
	{
		for(B=1;B<=5;B++)
		{
			if(B==A)
            continue;
			for(C=1;C<=5;C++)
			{
				if((C==A)||(C==B))
					continue;
				for(D=1;D<=5;D++)
				{
					if((D==A)||(D==B)||(D==C))
						continue;
					for(E=1;E<=5;E++)
					{
						if((E==A)||(E==B)||(E==C)||(E==D))
							continue;
						{
						if((E!=2)&&(E!=3))
						{  
							int a,b,c,d,e;
							a=(E==1),b=(B==2),c=(A==5),d=(C!=1),e=(D==1);
							if(a+b+c+d+e==2)
							{
								if((a+b==2)+(A+B==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
							    if((a+c==2)+(A+C==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((a+d==2)+(A+D==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((a+e==2)+(A+E==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((b+c==2)+(B+C==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((b+d==2)+(B+D==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((b+e==2)+(B+E==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((c+d==2)+(C+D==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((c+e==2)+(C+E==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
                                if((d+e==2)+(D+E==3)==2)
									cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
							}
						}
							
						}
					}
				}
			}
		}
	}
return 0;
}
int main()
{
	int pA, pB, pC, pD, pE;
	int tA, tB, tC, tD, tE;
	int yes, flag = 0;

	for (pA = 1; pA <= 5; pA++)
	{
		for (pB = 1; pB <= 5; pB++)
		{
			for (pC = 1; pC <= 5; pC++)
			{
				for (pD = 2; pD <= 5; pD++)
				{
					for (pE = 1; pE <= 5; pE++)
					{
						if ((pA == pB) || (pA == pC) || (pA == pD) || (pA == pE) || (pB == pC) ||
							(pB == pD) || (pB == pE) || (pC == pD) || (pC == pE) || (pD == pE))
							continue;
						tA = (((pA == 1) || (pA == 2)) && (pE == 1));
						tB = (pB == 2);
						tC = (((pC == 1) || (pC == 2)) && (pA == 5));
						tD = (((pD == 1) || (pD == 2)) && (pC != 1));
						tE = 0;
						yes = tA + tB + tC + tD + tE;
						if (yes == 2)
						{
							flag = 1;
							cout << pA << ' ' << pB << ' ' << pC << ' ' << pD << ' ' << pE << endl;
							break;
						}
					}
					if (flag) break;
				}
				if (flag) break;
			}
			if (flag) break;
		}
		if (flag) break;
	}

	return 0;
}
int main ()
{	
	int A, B, C, D, E, a, b, c, d, e;
	

	for (A = 1; A <= 5; A++)
	{
		for (B = 1; B <= 5; B++)
		{
			for (C = 1; C <= 5; C++)
			{
				for (D =1; D <= 5; D++)
				{
					for (E = 1; E <= 5; E++)
					{
						a = (E == 1);
						b = (B == 2);
						c = (A == 5);
						d = (C != 1);
						e = (D == 1);
						if (E!=2 && E!=3&&A != B && A!=C && A!=D && B!=C && B!=D && C!=D
							&&(A-a==0||B-b==0||C-c==0||D-d== 0)
							&&(A-a==1||B-b==1||C-c==1||D-d== 1)
							&&A-a+B-b+C-c+D-d+E-e==13
							&&A+a+B+b+C+c+D+d+E+e == 17
							&&(A+a ==2 ||B+b ==2||C+c==2||D+d==2||E+e==2)
							&&(A+a ==3 ||B+b ==3||C+c==3||D+d==3||E+e==3))
							cout << A << " " << B << " " << C << " " << D << " " << E;
					}
				}
			}
		}
	}
	return 0;
}
/*??E?????????E??D???????????E????????????A???????????D???????*/
int main ()
{
	int i, j, rank[6], ju[6];/*rank[4]?1??A??????ju[4]?1??D???????*/
	for (rank[1]=2; rank[1]<4; rank[1]++) {
		for (rank[2]=2; rank[2]<5; rank[2]++) {
			if (rank[2]==rank[1]) continue;
			for (rank[3]=1; rank[3]<5; rank[3]++) {
				if (rank[3]==rank[1]||rank[3]==rank[2]) continue;
				for (rank[4]=1; rank[4]<6; rank[4]++) {
					if (rank[4]==rank[1]||rank[4]==rank[2]||rank[4]==rank[3]) continue;
					for (rank[5]=1; rank[5]<6; rank[5]++) {
						if (rank[5]==rank[1]||rank[5]==rank[2]||rank[5]==rank[3]||rank[5]==rank[4]) continue;
						ju[1]=0;
						ju[2]=(rank[2]==2);
						ju[3]=(rank[5]==1);
						ju[4]=(rank[1]!=3);
						ju[5]=0;
						if(ju[rank[1]]==1&&ju[rank[2]]==1&&ju[rank[3]]==0&&ju[rank[4]]==0&&ju[rank[5]]==0) {
							for (i=1; i<6; i++)
								if (rank[i]==1) printf("%d", i);
							for (j=2; j<6; j++) {
								for (i=1; i<6; i++) {
									if (rank[i]==j) printf(" %d", i);
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main() {
	int A,B,C,D,E;
	for(A=2;A<=5;A++)//A?B???1? ?????????
	for(B=2;B<=5;B++)
	for(C=1;C<=5;C++)
	for(D=1;D<=5;D++)
	for(E=1;E<=5;E++)
	{//??????????????????????????????????????????
		if(((E==1)+(B==2)+(A==5)+(C!=1)+(D==1)==2)&&(A!=B)&&(A!=C)&&(A!=D)&&(A!=E)&&(B!=C)&&(B!=D)&&(B!=E)&&(C!=D)&&(C!=E)&&(D!=E)&&(E!=2)&&(E!=3)&&((D==1)+(A==2)==0&&(E!=1)) )
			cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<"\n";
	}
	cout<<endl;
	return 0;
}
int main()
{
	int A,B,C,D,E,words[6];
	for(int A=1;A<=5;A++)
	{
		for(int B=1;B<=5;B++)
		{
			if(B==A) {continue;}
			for(int C=1;C<=5;C++)
			{
				if(C==A||C==B) {continue;}
				for(int D=1;D<=5;D++)
				{
					if(D==A||D==B||D==C) {continue;}
					E=15-A-B-C-D;
					if((E!=2)&&(E!=3))
					{
						words[A]=(E==1);
						words[B]=(B==2);
						words[C]=(A==5);
						words[D]=(C!=1);
						words[E]=(D==1);
						if((words[1]==1)&&(words[2]==1)&&(words[3]==0)&&(words[4]==0)&&(words[5]==0))
						{
							cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int rank[6],a,b,c,d,e,i;
    for (e=1;e<=5;e++)
      if (e==2||e==3) continue;
      else 
       for (a=1;a<=5;a++)
          if (a==e) continue;
          else for (b=1;b<=5;b++)
                  if (e==b||a==b) continue;
                  else for (c=1;c<=5;c++)
                          if (e==c||a==c||b==c) continue;
                             else {
                                     d=15-a-b-c-e;
                                     rank[a]=(e==1);
                                     rank[b]=(b==2);
                                     rank[c]=(a==5);
                                     rank[d]=(c!=1);
                                     rank[e]=(d==1);                                     
                                     if (rank[1]==1&&rank[2]==1&&rank[3]==0&&rank[4]==0&&rank[5]==0)
                                       {                                                           
                                         cout <<a <<" " <<b <<" " <<c <<" " <<d <<" " <<e;
                                       } 
                                  } 
 
    return 0;
}
int main()
{
    int A,B,C,D,E,word[6];//A,B,C,D,E???????word??? 
    for(A=1;A<6;A++)
    {
                    for(B=1;B<6;B++)
                    {
                                    if (B==A) continue;//??????????? 
                                    for(C=1;C<6;C++)
                                    {
                                                    if ((C==A)||(C==B)) continue;
                                                    for(D=1;D<6;D++)
                                                    {
                                                                    if ((D==A)||(D==B)||(D==C)) continue;
                                                                    E=15-A-B-C-D;
                                                                    word[A]=(E==1);
                                                                    word[B]=(B==2);
                                                                    word[C]=(A==5);
                                                                    word[D]=(C!=1);
                                                                    word[E]=(D==1);
                                                                    word[0]=((E!=2)&&(E!=3));//?????E??2 ?3? 
                                                                    if (word[0]==1&&word[1]==1&&word[2]==1&&word[3]==0&&word[4]==0&&word[5]==0)//???? 
                                                                    cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E;
                                                    }
                                    }
                    }
    }
    return 0;
}
int main()
{
    int x[5];
int i,j;
for(x[0]=1;x[0]<=5;x[0]++)
{for(x[1]=1;x[1]<=5;x[1]++)
{if(x[1]==x[0])
continue;
for(x[2]=1;x[2]<=5;x[2]++)
{if(x[2]==x[0]||x[2]==x[1])
continue;
for(x[3]=1;x[3]<=5;x[3]++)
{if(x[3]==x[0]||x[3]==x[1]||x[3]==x[2])
continue;
for(x[4]=1;x[4]<=5;x[4]++)
{if(x[4]==x[0]||x[4]==x[1]||x[4]==x[2]||x[4]==x[3])
continue;
i=(x[4]!=2&&x[4]!=3)+(x[0]<=2&&x[4]==1||x[0]>2&&x[4]!=1)+(x[1]<=2&&x[1]==2||x[1]>2&&x[1]!=2)+(x[2]<=2&&x[0]==5||x[2]>2&&x[0]!=5)+(x[3]<=2&&x[2]!=1||x[3]>2&&x[2]==1)+(x[4]<=2&&x[3]==1||x[4]>2&&x[3]!=1);
if(i==6)
{cout<<x[0]<<" "<<x[1]<<" "<<x[2]<<" "<<x[3]<<" "<<x[4];}
}
}
}
                          }    
}
    
    
    
return 0;
    }
int main()
{
	int A=0, B=2, C=0, D=0, E=0,a, b, c, d,e,i;
	for(A=1; A<=5; A++)
		for(B=1; B<=2; B++)
			for(C=1; C<=5; C++)
				for(D=1; D<=5; D++)
					for(E=1; E<=5; E++)
					{
						a=(E==1);
						b=1;
						c=(A==5);
						d=(C!=1);
						e=(D==1);
						int m[5]={a,b,c,d,e};
						int n[5]={A,B,C,D,E};
						for(i=0; i<5; i++)
						{
							if(((B==1&&A==2&&a==1&&c+d+e==0)||(B==1&&C==2&&c==1&&a+d+e==0)||(B==0&&D==2&&d==1&&c+a+e==0)||(B==2&&A==1&&a==1&&c+d+e==0)||(B==2&&C==1&&c==1&&a+d+e==0)||(B==2&&D==1&&d==1&&c+a+e==0)||(B==2&&E==1&&e==1&&c+d+a==0))&&(A*B*C*D*E==120)&&D!=4)
							{
								cout<<A<<' '<<B<<' '<<C<<' '<<D<<' '<<E;
								break;
							}
					
							
						}
					}

return 0;
}
int main()
{
int a[6],word[6],i,j,k,l,m;
a[0]=0,word[0]=0;
for(i=1;i<6;i++)
  for(j=1;j<6;j++)
  {
  if(j==i)continue;
  for(k=1;k<6;k++)
    {
     if(j==k||k==i)continue; 
     for(l=1;l<6;l++)
      {
       if(l==k||l==i||l==j)continue; 
       m=15-i-j-k-l;
       if(m==2||m==3)continue;
       a[1]=i,a[2]=j,a[3]=k,a[4]=l,a[5]=m;
       word[1]=(a[5]==1);word[2]=(a[2]==2);word[3]=(a[1]==5);word[4]=(a[3]!=1);word[5]=(a[4]==1);
       int flag=0;
       for(int p=1;p<6;p++)
         {
          if(a[p]==1||a[p]==2)
            if(word[p]==0){flag=1;break;}
          if(a[p]!=1&&a[p]!=2)
            if(word[p]==1){flag=1;break;}        
         }
       if(flag==0)
         {
         for (int q=1;q<5;q++)cout<<a[q]<<' ';
         cout<<a[5];
         }
      }            
    }                
  }
cin.get();cin.get();
return 0;
}
int main()
{
    int a,b,c,d,e;
    int rank[6];

    for (a=1;a<=5;a++)
       for (b=1;b<=5;b++)
       if  (b!=a)
       for (c=1;c<=5;c++)
       if (c!=a&&c!=b)
       for (d=1;d<=5;d++)
       if (d!=a&&d!=b&&d!=c)
       for (e=1;e<=5;e++)
       if (e!=2&&e!=3&&e!=a&&e!=b&&e!=c&&e!=d)
       {
           rank[a]=(e==1);
           rank[b]=(b==2);
           rank[c]=(a==5);
           rank[d]=(c!=1);
           rank[e]=(d==1);
           if (rank[1]&&rank[2]&&!rank[3]&&!rank[4]&&!rank[5])//????????
           {
               cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
               return 0;
           }
       }
    return 0;
}
int mat[30000];
int s[30000];

int main()
{
	int a, b, c, d, e;
	int a1=0, b1=0, c1=0, d1=0, e1=0;
	for(a = 1; a < 6; a++){
		for(b = 1; b < 6; b++){
			for(c = 1; c < 6; c++){
				for(d = 1; d < 6; d++){
					for(e = 1; e < 6; e++){
						if(a!=b && a!=c && a!=d && a!=e && b!=c && b!=d && b!=e && c!=d && c!=e && d!=e && e!=2 && e!=3){
							a1=0, b1=0, c1=0, d1=0, e1=0;
							if(a==1 || a==2){
								if(e == 1)
									a1=1;
							}
							else{
								if(e != 1)
									a1 = 1;
							}



							if(b==1 || b==2){
								if(b == 2)
									b1=1;
							}
							else{
								if(b != 2)
									b1 = 1;
							}



							if(c==1 || c==2){
								if(a == 5)
									c1=1;
							}
							else{
								if(a != 5)
									c1 = 1;
							}



							if(d==1 || d==2){
								if(c == 5)
									d1=1;
							}
							else{
								if(c != 5)
									d1 = 1;
							}


							if(e==1 || e==2){
								if(d == 1)
									e1=1;
							}
							else{
								if(d != 1)
									e1 = 1;
							}

							//cout << a1 << " " << b1 << " " << c1 << " " << d1 << " " << e1 << endl;
							//cout << a << " " << b << " " << c << " " << d << " " << e << endl;

							if(a1==1 && b1==1 && c1==1 && d1==1 && e1==1)
								cout << a << " " << b << " " << c << " " << d << " " << e << endl;
						}
					}	
				}
			}
		}
	}

	return 0;
}
/*
 * 12.11.10d.cpp
 *  Created on: 2012-11-10
 *  Author: ???
 *  ???????
 */
int main() {
	int a,b,c,d,e,word[6];
	for(a=1;a<=5;a++){
		for(b=1;b<=5;b++){
			for(c=1;c<=5;c++){
				for(d=1;d<=5;d++){
					e=15-a-b-c-d;
					if(a==b||a==c||a==d||a==e||b==c||b==d||b==e||c==d||c==e||d==e)continue;
					word[a]=(e==1);
					word[b]=(b==2);
					word[c]=(a==5);
					word[d]=(c!=1);
					word[e]=(d==1);
					if(e==2||e==3)continue;
					if(word[1]==1&&word[2]==1&&word[3]==0&&word[4]==0&&word[5]==0){
						cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
					}
				}
			}
		}
	}
	return 0;
}
//??????????5???????????????????????5??????????E????????2???3?? 
//A???????E??????? 
//B????????????????? 
//C???????A???????? 
//D???????C????????? 
//E???????D?????????? 
//????????????????????????????????????A?B?C?D?E??????

const int A=0;
const int B=1;
const int C=2;
const int D=3;
const int E=4;
int main()
{
	int array[5]={0};
	int used[6]={0};
	for(int k1=1;k1<=5;k1++)
	{
		for(int k2=1;k2<=5;k2++)
		{
			for(int k3=1;k3<=5;k3++)
			{
				for(int k4=1;k4<=5;k4++)
				{
					for(int k5=1;k5<=5;k5++)
					{
						array[A]=k1;
						array[B]=k2;
						array[C]=k3;
						array[D]=k4;
						array[E]=k5;
						if(array[E]==2||array[E]==3)
							continue;
						int finish=0;
						for(int i=A;i<=E;i++)
						{
							for(int j=i+1;j<=E;j++)
							{
								if(array[i]==array[j])
								{
									finish=1;
									break;
								}
								
							}
							if(finish)
								break;
						}
						if(finish)
							continue;

						int flag[5];
						flag[A]=(array[E]==1);
		                flag[B]=(array[B]==2);
		                flag[C]=(array[A]==5);
		                flag[D]=(array[C]!=1);
		                flag[E]=(array[D]==1);
						int rank1,rank2,rank3,rank4,rank5;
						for(int k=A;k<=E;k++)
							if(array[k]==1)
								rank1=k;
						if(flag[rank1]==0)
							continue;
						
						for(int k=A;k<=E;k++)
							if(array[k]==2)
								rank2=k;
						if(flag[rank2]==0)
							continue;
						
						for(int k=A;k<=E;k++)
							if(array[k]==3)
								rank3=k;
						if(flag[rank3]==1)
							continue;
						
						for(int k=A;k<=E;k++)
							if(array[k]==4)
								rank4=k;
						if(flag[rank4]==1)
							continue;
						
						for(int k=A;k<=E;k++)
							if(array[k]==5)
								rank5=k;
						if(flag[rank5]==1)
							continue;
						for(int k=0;k!=4;k++)
							cout<<array[k]<<" ";
						cout<<array[4];
					}
				}
			}
		}
	}
	cout<<endl;
	return 0;
}
int main ()
{
    int a,b,c,d,e,sum[6];
    for(int a=1;a<6;a++)
      for(int b=1;b<6;b++)
        for(int c=1;c<6;c++)
          for(int d=1;d<6;d++)
            for(int e=1;e<6;e++)
            {
              if((e!=2)&&(e!=3)&&((a-b)*(a-c)*(a-d)*(a-e)*(b-c)*(b-d)*(b-e)*(d-c)*(e-c)*(d-e)!=0))
              {
                sum[a]=(e==1);//5?????? 
                sum[b]=(b==2);
                sum[c]=(a==5);
                sum[d]=(c!=1);
                sum[e]=(d==1);
                if((sum[1]+sum[2]==2)&&(sum[3]+sum[4]+sum[5]==0))//??????????? 
                cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
              }
            }    return 0;
}
int main(){
	int a,b,c,d,e;
	int h[5];
	for(a=1;a<=5;a++)
		for(b=1;b<=5;b++){
			if(b==a)continue;
			for(c=1;c<=5;c++){
				if(c==a||c==b)continue;
				for(d=1;d<=5;d++){
					if(d==a||d==b||d==c)continue;
					for(e=1;e<=5;e++){
						if(e==a||e==b||e==c||e==d)
							continue;
						if(e==2||e==3)       //e??2?3
							continue;
						h[0]=(a==1||a==2)+(e==1);
						h[1]=(b==1||b==2)+(b==2);
						h[2]=(c==1||c==2)+(a==5);
						h[3]=(d==1||d==2)+(c!=1);
	                    h[4]=(e==1)+(d==1)        ;                              //???????????????
						if((h[0]+h[1]+h[2]+h[3]+h[4]==4)&&(h[0]%2==0)&&(h[1]%2==0)
								&&(h[2]%2==0)&&(h[3]%2==0)&&(h[4]%2==0)){        //??????????
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
													}


					}
				}
			}
		}
	return 0;
}
int main()
{
    int a, b, c, d, e;
    for( e=1; e<6; e++ )
    {
    	if( e==2 || e==3 )
    		continue;
    	for( a=1; a<6; a++ )
    	{
    		if( a==e )
    			continue;
    		for( b=1; b<6; b++ )
    		{
    			if( b==a || b==e )
    				continue;
    			for( c=1; c<6; c++ )
    			{
    				if( c==a || c==b || c==e )
    					continue;
    				for( d=1; d<6; d++ )
    				{
    					if( d==a || d==b || d==c || d==e )
    						continue;
    					int a1, a2, a3, a4, a5;
    					a1=(e==1);
    					a2=(b==2);
    					a3=(a==5);
    					a4=(c!=1);
    					a5=(d==1);
    					int s=0;
    					for( int j=1; j<=2; j++)
    					{
    					if( a==j && a1==1)
    						s++;
    					if( b==j && a2==1)
    					    s++;
    					if( c==j && a3==1)
    					    s++;
    					if( d==j && a4==1)
    					    s++;
    					if( e==j && a5==1)
    					    s++;
    					}
    					for( int j=3; j<=5; j++)
    					{
    					    if( a==j && a1==0)
    					    	s++;
    					    if( b==j && a2==0)
    					    	s++;
    					    if( c==j && a3==0)
    					    	s++;
    					    if( d==j && a4==0)
    					    	s++;
    					    if( e==j && a5==0)
    					        s++;
    					}
    					if(s==5)
    					{
    						cout << a << " " << b << " " << c << " " << d << " " << e ;
    						return 0;
    					}
    				}
    			}
    		}
    	}
    }
}
int main()
{
	int a,b,c,d,e,i=1,j=1,t=1,k=1,word[6]={0},rank[6]={0};
	for(i=1;i<=5;i++)            //??e?????????????????
	{
		if(i==2||i==3)
			continue;
		else
			e=i;
		for(j=1;j<=5;j++)   //???????a?b?c?d
		{
			if(j==i)
				continue;
			else
				a=j;
			for(t=1;t<=5;t++)
			{
				if(t==i||t==j)
					continue;
				else
					b=t;
				for(k=1;k<=5;k++)
				{
					if(k==i||k==j||k==t)
						continue;
					else
						c=k;
					d=15-i-j-t-k;
					word[1]=(e==1);//?5???????
					word[2]=(b==2);
					word[3]=(a==5);
					word[4]=(c!=1);
					word[5]=(d==1);
					rank[a]=1;   //????????
					rank[b]=2;
					rank[c]=3;
					rank[d]=4;
					rank[e]=5;
					if(word[rank[1]]==1&&word[rank[2]]==1&&word[rank[3]]==0&&word[rank[4]]==0&&word[rank[5]]==0)  
                                              //????1?2?????
						cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
				}
			}
		}
	}
	return 0;
}
int bb(int x,int y)
{
     if((x==1)||(x==2))
	 {if(y==1)
	 return 1;
	 else 
		 return 0;
	 }
	 else
	 {if(y==1)
	 return 0;
	 else 
		 return 1;
	 }

}

int main()
{int a,b,c,d,e;
 int as,bs,cs,ds,es;

 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;
			 e=15-a-b-c-d;
			 if(e!=2&&e!=3)
			 {as=(e==1);
			  bs=(b==2);
			   cs=(a==5);
			   ds=(c!=1);
			   es=(d==1);
		if(bb(a,as)+bb(b,bs)+bb(c,cs)+bb(d,ds)+bb(e,es)==5)		  
					cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
                        

			    }
	
			 }  
      
		 }

	 }
	 
 }


return 0;

}
int main()
{
	int a,b,c,d,e,i,j,k,s,a1,b1,c1,d1,e1;
	for(a=1;a<6;a++)
		for(b=1;b<6;b++)
			for(c=1;c<6;c++)
				for(d=1;d<6;d++)
					for(e=1;e<6;e++)
						if((e!=2)&&(e!=3))
						{
	a1=(e==1);
	b1=(b==2);
	c1=(a==5);
	d1=(c!=1);
	e1=(d==1);
							if((((a==1)&&(b==2))||((a==2)&&(b==1)))&&(a1)&&(b1)&&(!c1)&&(!d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}
                            if((((a==1)&&(c==2))||((a==2)&&(c==1)))&&(a1)&&(!b1)&&(c1)&&(!d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}
                             if((((a==1)&&(d==2))||((a==2)&&(d==1)))&&(a1)&&(!b1)&&(!c1)&&(d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((a==1)&&(e==2))||((a==2)&&(e==1)))&&(a1)&&(!b1)&&(!c1)&&(!d1)&&(e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((c==1)&&(b==2))||((c==2)&&(b==1)))&&(!a1)&&(b1)&&(c1)&&(!d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((d==1)&&(b==2))||((d==2)&&(b==1)))&&(!a1)&&(b1)&&(!c1)&&(d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((e==1)&&(b==2))||((e==2)&&(b==1)))&&(!a1)&&(b1)&&(!c1)&&(!d1)&&(e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((c==1)&&(d==2))||((c==2)&&(d==1)))&&(!a1)&&(!b1)&&(c1)&&(d1)&&(!e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((c==1)&&(e==2))||((c==2)&&(e==1)))&&(!a1)&&(!b1)&&(c1)&&(!d1)&&(e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}

							 if((((d==1)&&(e==2))||((d==2)&&(e==1)))&&(!a1)&&(!b1)&&(!c1)&&(d1)&&(e1)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=e)&&(c!=e)&&(d!=e)&&(b!=d)&&(c!=d))
							{	cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
							  return 0;
							}
						}
}
int main()
{
    int a[5];
    int z;
    int  b[6]={0};
    int i,j,k,l,m;
//int i;
    int r=1;
    int q;
    for(i=5;i>=1;i--)
    {
        for(j=1;j<=5;j++)

            for(k=1;k<=5;k++)
           {
                for(l=1;l<=5;l++)
              {
                    for(m=1;m<=5;m++)
                    {
                        a[0]=i;a[1]=j;a[2]=k;a[3]=l;a[4]=m;
                        //if((a[0]==5)&&(a[1]==1)&&(a[2]==2)&&(a[3]==3)&&(a[4]==4))
                      //{




                        if((a[0]!=a[1])&&(a[0]!=a[2])&&(a[0]!=a[3])&&(a[0]!=a[4])&&(a[1]!=a[2])&&(a[1]!=a[3])&&(a[1]!=a[4])&&(a[2]!=a[3])&&(a[2]!=a[4])&&(a[3]!=a[4]))
                        {
                           // cout<<"?";
                            if(a[4]==1)
                            b[a[0]]=1;
                            if(a[1]==2)
                            b[a[1]]=1;
                            if(a[0]==5)
                            b[a[2]]=1;
                            if(a[2]!=1)
                            b[a[3]]=1;
                            if(a[3]==1)
                            b[a[4]]=1;
                     // for(i=0;i<=4;i++)

                      //{

                      //  cout<<b[a[i]];
                      //}
                            if((a[4]!=2)&&(a[4]!=3))

                            {  // cout<<"!";
                                if((b[a[0]]+b[a[1]]+b[a[2]]+b[a[3]]+b[a[4]])==2)

                             {         //cout<<"!";
                                    for(z=0;z<=4;z++)
                                    {
                                        if(((a[z]==1)||(a[z]==2))&&(b[a[z]]!=1))
                                            r=0;
                                    }
                                if(r!=0)
                                  {


                                cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4];
                                  }
                              }

                            }



                       }
                      }
                          r=1;
                            for(q=1;q<=5;q++)
                            {
                                b[q]=0;
                            }


                    }
              //}
                }
            }




    return 0;
}