semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//????
int main()
{
	int a, b, c, d, e, i, j, m, n, A, B, C, D, E, p = 0;
	for(i = 1; i <= 5; i++)
	{
		a = i;
		for (j = 1; j <= 5; j++)
		{
			b = j;
			if (b == a)
				continue;
			for (m = 1; m <= 5; m++)
			{
				c = m;
				if (c == a || c == b)
					continue;
				for (n = 1; n <= 5; n++)
				{
					d = n;
					if (d == a || d == c || d == b)
						continue;
					e = 15 - a - b - c -d;
					if (e == 2 || e == 3)
						continue;
				    A = (e == 1);
					B = (b == 2);
					C = (a == 5);
					D = (c != 1);
					E = (d == 1);
					if (A + B + C + D + E == 2)
					{
					if (A == 1 && a < 3)
						p++;
					if (B == 1 && b < 3)
						p++;
					if (C == 1 && c < 3)
						p++;
					if (D == 1 && d < 3)
						p++;
					if (E == 1 && e < 3)
						p++;
					if (p == 2)
						cout << a << " " << b << " " << c << " " << d << " " << e;
					else if (p != 2)
						p = 0;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int ca, cb, cc, cd, ce, 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++)
						{
						    ca = (e==1);
							cb = (b==2);
							cc = (a==5);
							cd = (c!=1);
							ce = (d==1);
							if ((ca+cb+cc+cd+ce==2)&&(a*b*c*d*e==120)&&(ca*a+cb*b+cc*c+cd*d+ce*e==3)&&((ca*a)<=2)&&((cb*b)<=2)&&((cc*c)<=2)&&((cd*d)<=2)&&((ce*e)<=2)&&(e!=2)&&(e!=3))							
								cout << a << " " << b << " " << c << " " << d << " " << e;
						}
					}						
			 }
		}
	}
	return 0;
}
/*??????????5???????????????????????5??????????E????????2???3??
A???????E???????
B?????????????????
C???????A????????
D???????C?????????
E???????D??????????
????????????????????????????????????A?B?C?D?E??????
 */
int main()
{   int num=0;
    int a=0,b=0,c=0,d=0,e=0;        //a,b,c,d,e ????????????,????1,???0;
    for(int A=1;A<6;A++)
	   for(int B=1;B<6;B++)
	   {    if(A==B) continue;
		   for(int C=1;C<6;C++)
		   {   if(A==C || B==C)   continue;  //???continue???????????????????
			   for(int D=1;D<6;D++)
			   {    if(A==D || B==D || C==D)  continue;
				   for(int E=1;E<6;E++)
				  	{
				  	  if(E==2 || E==3)   continue;                   //??Es?2??3??????????????
				  	  if(A==E || B==E || C==E || D==E) continue;     
				  	  a=(E==1);
				  	  b=(B==2);
				  	  c=(A==5);
				  	  d=(C!=1);
				  	  e=(D==1);
				  	  num=     ( (A<3 && a==1) || (A>=3 && a==0)  )
				  			  +( (B<3 && b==1) || (B>=3 && b==0)  )
				  			  +( (C<3 && c==1) || (C>=3 && c==0)  )
				  			  +( (D<3 && d==1) || (D>=3 && d==0)  )
				  			  +( (E<3 && e==1) || (E>=3 && e==0)  );
				  	  if(num==5) {cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;break;}
				  	}   //num?5?????????????
			   }

		   }

	   }
return 0;
}
int main() {
	int a,b,c,d,e;
	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;
					for(e=1;e<=5;++e) { if((a==e)||(b==e)||(c==e)||(d==e)||(e==2)||(e==3)) continue;//????
					         if  ( (((a<3)&&(e==1))||((a>2)&&(e!=1)))+
					                (b!=1)                           + 
					        	   (((c<3)&&(a==5))||((c>2)&&(a!=5)))+
					        	   (((d<3)&&(c!=1))||((d>2)&&(c==1)))+
					        	   (((e<3)&&(d==1))||((e>2)&&(d!=1)))==5)     //????
					        	 cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;     	 
					}
			    }	
			}
		}
	
	return 0;
}
int main()
{
	int a, b, c, d, e, k = 0;
	for (e = 4; e <= 5; e++)
		for (b = 2; b <= 5; b++)
		{
			if (b == e)
				continue;
			for (c = 1; c <= 5; c++)
			{
				if (c == b || c == e)
					continue;
				for (d = 1; d <= 5; d++)
				{
					if (d == e || d == b || d == c)
						continue;
					for (a = 4; a <= 5; a++)
					{
						if (e == a || a == b || a == c || a == d)
							continue;
						k = (e == 1) + (b == 2) + (a == 5) + (c != 1) + (d == 1);
						if ((b == 2 && c  == 1 && a == 5 && k == 2) || (b == 2 && d == 1 && a !=5 && k == 2)
							||(c == 2 && a == 5 && d == 1 && k == 2) )
						{
							cout << a;
							cout << " " << b << " " << c << " " << d << " " << e << endl;
						}
					}
				}
			}
		}
		return 0;
}
int main()
{
	int a[6];
	int i , p1, p2 ;
	int flag[6] = {0} ;
	int p;
	p =1;

	for( a[1] = 1; a[1] <= 5 ; a[1] ++)
	{
		for( a[2] = 1 ; a[2] <= 5 ; a[2] ++)
		{   
			if(a[2] == 2)
			for(a[3] =1; a[3] <= 5 ; a[3] ++)
			{
				for( a[4] = 1 ;a[4] <= 5; a[4] ++)
				{
					for( a[5] =1 ; a[5] <= 5;a[5] ++)
					{
						if(a[5] == 2 || a[5] == 3) continue;; 
						
						for( i =1 ;i <= 5; i ++)
							flag[a[i] ] ++;
						for(i = 1 ;i <= 5; i ++)
						{
							if( flag[i] != 1)
							{
								p = 0 ;
								break;
							}
						}
					    if( p == 1)
						{
							for( i =1 ;i <= 5 ;i++)
							{
								if(a[i] == 1) 
									p1 = i;
								else if(a[i] == 2)
									p2 = i;
							}
							if( ( p1 == 3 && a[1] == 5 ) || ( p1 == 4 ) )
							{
								if( (p2 == 1 && a[5] == 1 ) || (p2 == 2) || ( p2 == 3 && a[1] == 5) || (p2 == 4 && a[3] != 1) || (p2 == 5 && a[4] == 1) )
								{
								 p = (a[5] ==1) + (a[1] == 5 ) + (a[3] != 1) + (a[4] == 2);
								 if( p == 1 && a[1] == 5)
								 {
									 printf("%d" ,a[1]);
								  for(i = 2 ; i<= 5 ;i++)
									 printf(" %d" ,a[i]);
								  printf("\n");
								 }
								}
							}
						}
						for(i = 1 ; i <= 5 ;i++)
							flag[i] = 0;
						p =1;
					}
				}
			}
		}
	}
	return 0;
}
/*
 *  ????.cpp
 *  ??????
 *  ????: 2011-11-6
 *  ????????????
 */

int main(){
	int a,b,c,d,e,i,j;  //????
	int m[5],n[5];
	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*c*d*e==120)&&(e!=2)&&(e!=3)){  //??????e????
						    m[0]=a;  //m????n??????
						    m[1]=b;
						    m[2]=c;
						    m[3]=d;
						    m[4]=e;
						    n[0]=(e==1);
						    n[1]=(b==2);
						    n[2]=(a==5);
						    n[3]=(c!=1);
						    n[4]=(d==1);
						    for(i=0;i<5;i++)  //???????
						    	for(j=0;j<5;j++)
						    		if((i<j)&&(m[i]+m[j]==3)&&(n[i]+n[j]==2)&&(n[0]+n[1]+n[2]+n[3]+n[4]==2)){
						    				cout<<m[0];  //????
						    				cout<<" "<<m[1];
						    				cout<<" "<<m[2];
						    				cout<<" "<<m[3];
						    				cout<<" "<<m[4];

						    		}

}

	return 0;  //????
}
int main()
{
    int a,b,c,d,e;
    for (a=1;a<=5;a++)
      for (b=1;b<=5;b++)
       if (a!=b)                   //???????? 
          for (c=1;c<=5;c++)
            if (a!=c&&b!=c)         //???????? 
              for (d=1;d<=5;d++)
               if (a!=d&&b!=d&&c!=d)         //???????? 
                  for (e=1;e<=5;e++)
                    if (a+b+c+d+e==15)         //???????? 
                      if (((((a==1||a==2)&&e==1)||(a!=1&&a!=2&&e!=1))+((b==2)||(b!=1&&b!=2))+(((c==1||c==2)&&a==5)||(c!=1&&c!=2&&a!=5))+(((d==1||d==2)&&c!=1)||(d!=1&&d!=2&&c==1))+(((e==1||e==2)&&d==1)||(e!=1&&e!=2&&d!=1)))==5)     //??????????12????,????12??,??????? 
                        {
                           if (e!=2&&e!=3)
                           cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
                        }
    return 0;
    
}
int main()
{
	int n[5]={0};
	int ans[5]={0},i,j;
	for(n[0]=1;n[0]<=5;n[0]++)
		for(n[1]=1;n[1]<=5;n[1]++)
			for(n[2]=1;n[2]<=5;n[2]++)
				for(n[3]=1;n[3]<=5;n[3]++)
					for(n[4]=1;n[4]<=5;n[4]++)
					{
						int flag=0,cc,count=0;
						for(i=0;i<4;i++)
							for(j=i+1;j<5;j++)
								if(n[i]==n[j])
								{
									flag=1;
									break;
								}
								//cc1=(A!=B)&&(A!=C)&&(A!=D)&&(A!=E)&&(B!=C)&&(B!=D)&&(B!=E)&&(C!=D)&&(C!=E)&&(D!=E);
						cc=(n[4]!=2)&&(n[4]!=3);
						ans[0]= (n[4]==1);
						ans[1]= (n[1]==2);
						ans[2]= (n[0]==5);
						ans[3]= (n[2]!=1);
						ans[4]= (n[3]==1);
						if(flag==0&&cc==1)
						{
							for(i=0;i<5;i++)
							{
								if((n[i]==1||n[i]==2)&&ans[i]==1)
									count++;
								if((n[i]!=1&&n[i]!=2)&&ans[i]==0)
									count++;
							}
							if(count==5)
							{
								for(i=0;i<4;i++)
									cout<<n[i]<<' ';
								cout<<n[4]<<endl;
							}
						}
					}
	return 0;
}
int main(void)
{
    int a[5],i,j,k,c=0,s,t,c1=0;
    int ag[5];
    for(a[0]=1;a[0]<=5;a[0]++)
        for(a[1]=1;a[1]<=5;a[1]++)
            for(a[2]=1;a[2]<=5;a[2]++)
                for(a[3]=1;a[3]<=5;a[3]++)
                    for(a[4]=1;a[4]<=5;a[4]++)
                    {
                        ag[0]= (a[4]==1);
                        ag[1]= (a[1]==2);
                        ag[2]= (a[0]==5);
                        ag[3]= (a[2]!=1);
                        ag[4]= (a[3]==1);
                        for(i=0;i<5;i++)
                            for(j=0;j<5;j++)
                                if(a[i]==1&&a[j]==2&&ag[i]==1&&ag[j]==1)
                                {
                                    c=0;
                                    //printf("%d %d\n",a[i],a[j]);
                                    for(k=0;k<5;k++)
                                    {
                                        if(k!=i&&k!=j)
                                            if(ag[k]==0)
                                                c++;
                                        //printf("%d\n",c);
                                    }
                                    if(c==3)
                                    {
                                        c1=0;
                                        for(s=0;s<5;s++)
                                        {
                                            for(t=s+1;t<5;t++)
                                                if(a[s]!=a[t])
                                                    c1++;
                                        }
                                        //printf("%d\n",c1);
                                        if(c1==10)
                                            if(a[4]!=2&&a[4]!=3)
                                        {
                                            for(s=0;s<5;s++)
                                            {
                                                printf("%d",a[s]);
                                                if(s!=4)
                                                    printf(" ");
                                            }
                                        }
                                        //printf("\n");
                                    }
                                        
                                }
                            
                        
                    }
    return 0;
}
int main()
{int A,B,C,D,E;//????
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==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)==0&&(E!=2)+(E!=3)==2&&A==5&&B!=1)

					                    	cout<<A<<' '<<B<<' '<<C<<' '<<D<<' '<<E<<endl;//?????.?b???b???1
				}
				}
				}
				}
                }	//??????????


return 0;
}
int main ()
{
	int a,b,c,d,e;
	int A,B,C,D,E;
	for(a=1;a<=5;a++)
	{
		for(b=1;b<=5;b++)
		{
			if(b==a)
			{
				continue;
			}
			else
			{
				for(c=1;c<=5;c++)
				{
					if(c==b||c==a)
					{
						continue;
					}
					else
					{
						for(d=1;d<=5;d++)
						{
							if(d==a||d==b||d==c)
							{
								continue;
							}
							else
							{
								e=15-a-b-c-d;
								A=(e==1);
					  B=(b==2);
					  C=(a==5);
					  D=(c!=1);
					  E=(d==1);




					  if((a*b==2)&&e!=2&&e!=3&&A==1&&B==1&&C==0&&D==0&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(a*c==2&&e!=2&&e!=3&&A==1&&C==1&&B==0&&D==0&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e << endl;
					  }
					  else if((a*d)==2&&e!=2&&e!=3&&A==1&&B==0&&C==0&&D==1&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if((a*e)==2&&e!=2&&e!=3&&A==1&&B==0&&C==0&&D==1&&E==1)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(b*c==2&&e!=2&&e!=3&&A==0&&B==1&&C==1&&D==0&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<endl;
					  }
					  else if(b*d==2&&e!=2&&e!=3&&A==0&&B==1&&C==0&&D==1&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(b*e==2&&e!=2&&e!=3&&A==0&&B==1&&C==0&&D==0&&E==1)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(c*d==2&&e!=2&&e!=3&&A==0&&B==0&&C==1&&D==1&&E==0)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(c*e==2&&e!=2&&e!=3&&A==0&&B==0&&C==1&&D==0&&E==1)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }
					  else if(e*d==2&&e!=2&&e!=3&&A==0&&B==0&&C==0&&D==1&&E==1)
					  {
						  cout << a << " " << b <<" "<< c <<" "<< d<<" "<< e <<  endl;
					  }









							}
						}
					}
				}
			}
		}
	}
	
	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((A != B)&&(A != C)&&(A != D)&&(A != E)&&(B != C)&&(B != D)&&(B != E)&&(C != D)&&(C != E)&&(D != E)&&
						((A * a + B * b + C * c + D * d + E * e) == 3)&&(a + b + c + d + e == 2)
						   && (E != 2)&& (E != 3))
							cout << A << " " << B << " " << C << " " << D << " " << E << endl;
				}
				    
				    return 0;
}
int main(){
	int A,B,C,D,E,word[6];
	for(A=1;A<=5;A++){
		for(B=1;B<=5;B++){
			if(B==A)continue;//?continue??A,B,C,D,E?????? 
			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;
						word[A]=(E==1);
						word[B]=(B==2);
						word[C]=(A==5);
						word[D]=(C!=1);
						word[E]=(D==1);//?word[A]???????? 
						if(word[1] && word[2] && !word[3] && !word[4] && !word[5] && E!=2 && E!=3)
						cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E;
						}
					}
				}
			}
		}
		
		return 0;
	}
int main()
{
    int a,b,c,d,e,f,g,h,i,j;
    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++)
                   {
                       if (a * b * c * d * e==120 && a + b + c + d + e == 15)
                       {
                             f = (e==1);
                             g = (b==2);
                             h = (a==5);
                             i = (c!=1);
                             j = (d==1);
                             if (f + g + h + i + j==2)
                             {
                                   if ((a == f || b == g || c == h || d == i || e == j) && (a == f + 1 || b == g + 1 || c == h + 1 || d == i + 1 || e == j + 1) && e != 2 && e != 3)
                                   cout << a << " " << b << " " << c << " " << d << " " << e;
                             }
                       }
                   }
    
    return 0;
}
int main()
{
	int A, B, C, D, E, a, b, c, d, e,x, y, z;
	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);
						x = a*A + b*B+c*C+d*D+e*E;
						y = A+B+C+D+E;
						z= A * B* C*D*E;
						if ((E!=3)&&(E!=2)&&(x == 3)&&(y == 15)&&(z == 120)&&((a*A )!=3)&&((b*B)!=3)&&((c * C)!=3)&&((d*D)!=3)&&((e*E)!=3))
							cout <<A <<' '<<B<<' '<<C<<' '<<D<<' '<<E;
					}
 
					

	return 0;
}
int main()
{
	int a, b, c, d, e, A, B, C, D, E, sum;
	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);
						sum = A+B+C+D+E;
							if(a==5 && b==5&& c==5&& d==5 && e==5)cout << '5' << ' '<< '2' << ' ' << '1' << ' '<< '3' << ' ' <<'4' << endl;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int rank[10],thought[10],a,b,c,d,e,i,k=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;
                    for(e=1;e<=5;e++)
					{
						if(a==e||b==e||c==e||d==e||e==2||e==3)
							continue;
						thought[a]=(e==1);
						thought[b]=(b==2);
						thought[c]=(a==5);
						thought[d]=(c!=1);
						thought[e]=(d==1);
						if(thought[1]==1&&thought[2]==1&&thought[3]==0&&thought[4]==0&&thought[5]==0)
						{
							rank[1]=a;
							rank[2]=b;
							rank[3]=c;
							rank[4]=d;
							rank[5]=e;
						}
					}
				}
			}
		}
	}
	for(i=1;i<=5;i++)
	{
		if(k==0)
		{
		cout<<rank[i];
		k++;
		}
		else if(k!=0)
        cout<<" "<<rank[i];
	}
	return 0;
}
int main(){
     int bb[5],g,h,i,aa[6];
  for(bb[0]=1;bb[0]<=5;bb[0]++){
      for(bb[1]=1;bb[1]<=5;bb[1]++){
      if(bb[1]==bb[0])
        continue;
         for(bb[2]=1;bb[2]<=5;bb[2]++){
        if(bb[2]==bb[1]||bb[2]==bb[0])
           continue;
           for(bb[3]=1;bb[3]<=5;bb[3]++){
                   if(bb[3]==bb[0]||bb[3]==bb[1]||bb[3]==bb[2])
                     continue;
                 g=0;
                   h=0;         
              bb[4]=15-bb[0]-bb[1]-bb[2]-bb[3];
         if(bb[4]==2||bb[4]==3)
        continue;
            aa[0]=(bb[4]==1);
            aa[1]=(bb[1]==2);
            aa[2]=(bb[0]==5);
            aa[3]=(bb[2]!=1);
            aa[4]=(bb[3]==1);
           
          if(aa[0]+aa[1]+aa[2]+aa[3]+aa[4]==2){ 
        
             for(i=0;i<=4;i++){
               if((bb[i]==1)&&(aa[i]==1))
                  g=1;
                }
              for(i=0;i<=4;i++){
               if((bb[i]==2)&&(aa[i]==1))
                  h=1;
                }
                 }
                 
                 if(g==1&&h==1)
         cout<<bb[0]<<" "<<bb[1]<<" "<<bb[2]<<" "<<bb[3]<<" "<<bb[4]<<endl;
              }
              }
           }
       }
return 0;
}
int main()
{int A[6],as[6];
for(A[1]=1;A[1]<6;A[1]++)
	for(A[2]=1;A[2]<6;A[2]++)
		for(A[3]=1;A[3]<6;A[3]++)
			for(A[4]=1;A[4]<6;A[4]++)
				for(A[5]=1;A[5]<6;A[5]++)
				{as[1]=(A[5]==1);
                 as[2]=(A[2]==2);
                 as[3]=(A[1]==5); 
                 as[4]=(A[3]!=1);
                 as[5]=(A[4]==1);
				 if((A[5]!=2)&&(A[5]!=3)&&((as[1]+as[2]+as[3]+as[4]+as[5])==2)&&(A[1]!=A[2])&&(A[1]!=A[3])&&(A[1]!=A[4])&&(A[1]!=A[5])&&(A[2]!=A[3])&&(A[2]!=A[4])&&(A[2]!=A[5])&&(A[3]!=A[4])&&(A[3]!=A[5])&&(A[4]!=A[5]))
					{ for(int i=1;i<=5;i++)
					 if(A[i]==1&&as[i]==1)
					 {for(int j=1;j<=5;j++)
                      if(A[j]==2&&as[j]==1)
						  cout<<A[1]<<" "<<A[2]<<" "<<A[3]<<" "<<A[4]<<" "<<A[5]<<endl;}}}
return 0;
}
int main(){
    int A,B,C,D,E,i,j; //?????
    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++)
    {
        

          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)&&(((A==1||A==2)&&E==1)+((B==1||B==2)&&B==2)+((C==1||C==2)&&A==5)+((D==1||D==2)&&C!=1)+(E==1&&D==1)==2)) cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E; //??????????????





        }
        }
        }

        }
        }



    return 0;
    }
/*
 * 1.cpp
 *
 *  Created on: 2012-11-09
 *      Author: 12162
 *      Function:????
 */



int main() {
	int A, B, C, D, E;
	int rank[6];//ABCDE???
	int words[6];//????????
	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;
					words[1] = (E == 1);
					words[2] = (B == 2);
					words[3] = (A == 5);
					words[4] = (C != 1);
					words[5] = (D == 1);
					rank[A] = 1;//?????????????
					rank[B] = 2;
					rank[C] = 3;
					rank[D] = 4;
					rank[E] = 5;
					if (words[rank[3]] == 0 && words[rank[4]] == 0
							&& words[rank[5]] == 0 && words[rank[1]] == 1
							&& words[rank[2]] == 1 && E != 2 && E != 3) {
						cout << A << " " << B << " " << C << " " << D << " "
								<< E;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
  int rank[6];
  char words[6];
  int a,b,c,d,e;
  int i,j,k,sum;
  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++)
          {
            words[a]=(e==1);
            words[b]=(b==2);
            words[c]=(a==5);
            words[d]=(c!=1);
            words[e]=(d==1);
            rank[1]=a;
            rank[2]=b;
            rank[3]=c;
            rank[4]=d;
            rank[5]=e;
            if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e)
            {
             sum=words[2]+words[1];
             k=words[3]+words[4]+words[5];
             if(sum==2&&k==0&&e!=2&&e!=3)
             {
               for(i=1;i<5;i++)
               {
                 cout << rank[i] << " ";
               }
               cout << rank[5] << endl;
             }
            }
          }
        }
      }
    } 
  }
  cin.get();cin.get();cin.get();
  return 0;
 
}
/*
 * five.cpp
 *
 *  Created on: 2011-11-6
 *      Author: b
 */
int main()//?????
{//?????
	int 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++)//??
						{if((A==B)||(A==C)||(A==D)||(A==E)||(B==C)||(B==D)||(B==E)||(C==D)||(C==E)||(D==E))continue;
						if((E!=2)&&(E!=3)&&((E==1)+(B==2)+(A==5)+(C!=1)+(D==1))==2&&
						((((A==1)+(A==2)+(E==1))==0)||((A==1)+(A==2)+(E==1))==2)&&
						((((B==1)+(B==2)+(B==2))==0)||((B==1)+(B==2)+(B==2))==2)&&
						((((C==1)+(C==2)+(A==5))==0)||((C==1)+(C==2)+(A==5))==2)&&
						((((D==1)+(D==2)+(C!=1))==0)||((D==1)+(D==2)+(C!=1))==2)&&
						((((E==1)+(E==2)+(D==1))==0)||((E==1)+(E==2)+(D==1))==2)
						)//??????
							cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;}//??
	return 0;//???????????????????
}//????
/*
 * air.cpp
 *
 *  Created on: 2011-11-6
 *      Author: b
 */

int main(){
	int a,b,c,d,e,aa,bb,cc,dd,ee;    //????a,b,c,d,e??????aa,bb,cc,dd,ee
	for (a=1;a<=5;a++)
		for (b=1;b<=5;b++) if (b==a) continue;
		else for (c=1;c<=5;c++) if ((c==a)||(c==b)) continue;
		else for (d=1;d<=5;d++) if ((d==a)||(d==b)||(d==c)) continue;
		else {
			e=15-a-b-c-d;   //????????15
			aa=(e==1);
			bb=(b==2);
			cc=(a==5);
			dd=(c!=1);
			ee=(d==1);
			if ((e!=2)&&(e!=3)&&(a*aa+b*bb+c*cc+d*dd+e*ee==3)&&(aa+bb+cc+dd+ee==2)) //?????????????3?????????2????????????1,2
				cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
		}
	return 0;
}
int main(void)
{
	int A[5], a[5], i, num; //??????????????????????????????
	for( A[0] = 1 ; A[0] <= 5 ; A[0]++ )
	for( A[1] = 1 ; A[1] <= 5 ; A[1]++ )
	{
		if( A[0] != A[1] )
			for( A[2] = 1 ; A[2] <= 5 ; A[2]++ )
			{
				if( A[0] != A[2] && A[1] != A[2] )
					for( A[3] = 1 ; A[3] <= 5 ; A[3]++ )
					{
						if( A[0] != A[3] && A[1] != A[3] && A[2] != A[3] )
						{
							num = 0; //????????????????????
							A[4] = 15 - A[0] - A[1] - A[2] - A[3];
							if( A[4] != 2 && A[4] != 3 )
							{
								a[0] = A[4] == 1;
								a[1] = A[1] == 2;
								a[2] = A[0] == 5;
								a[3] = A[2] != 1;
								a[4] = A[3] == 1;
								for( i = 0 ; i < 5 ; i++ )
								{
									if( a[i] && A[i] <= 2 )
										num ++;
									if( a[i] == 0 && A[i] >= 3 )
										num ++;
								}
							}
							if( num == 5 )
							{
								for( i = 0 ; i < 4 ; i++ )
									cout << A[i] << " ";
								cout << A[i];
							}
						}
					}
			}
	}
	return 0;
}