semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main ( )
{
	int i, j, k, l, rank[6] = {0};
	for (i = 1;i <= 5;i++)
	{
		rank[1] = i; 
		for (j = 1;j <= 5;j++)
		{
			if (j == i)
				continue;
			else
			{
				rank[2] = j;
				for (k = 1;k <= 5;k++)
				{
					if (k == i || k == j)
						continue;
					else
					{
						rank[3] = k;
						for (l = 1;l <= 5;l++)
						{
							if (l == i || l == j || l == k)
								continue;
							else
							{
								rank[4] = l;
								rank[5] = 15 - rank[1] - rank[2] - rank[3] - rank[4];
								if(((rank[1] == 1||rank[1] == 2)^(rank[5] == 1) == 0) &&
									((rank[2] == 1||rank[2] == 2)^(rank[2] == 2) == 0) && 
									((rank[3] == 1||rank[3] == 2)^(rank[1] == 5) == 0) &&
									((rank[4] == 1||rank[4] == 2)^(rank[3] != 1) == 0) &&
									((rank[5] == 1||rank[5] == 2)^(rank[4] == 1) == 0)
									&&(rank[5] != 2)&&(rank[5] != 3)) 
								{
									cout <<rank[1]<<' '<<rank[2]<<' '<<rank[3]<<' '<<rank[4]<<' '<<rank[5]<<endl;
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a,b,c,d,e,s[6];//????
	for(a=1;a<=5;a++)
		for(b=1;b<=5;b++)
		{
			if(a==b)
				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;
						s[a]=(e==1);
						s[b]=(b==2);
						s[c]=(a==5);
						s[d]=(c!=1);
						s[e]=(d==1);
				
						if((s[1]+s[2]==2)&&(s[3]+s[4]+s[5]==0)&&e!=2&&e!=3)
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
					
					}
				}
			}
		}

	return 0;
}
// 5???????????????????E??????2??3.
// 	A????E??1.
// 	B????B????2.
// 	C????A????
// 	D????C??????
// 	E????D??1.
// 	???????????????1??2????????????????????
int main()
{
	for (int A = 1 ; A <= 5 ; A ++)
	{
		for (int B = 1 ; B <= 5 ; B ++)
		{
			for (int C = 1 ; C <= 5 ; C ++)
			{
				for (int D = 1 ; D <= 5 ; D ++)
				{
					for (int 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&& E != 2 && E != 3)
						{
							int m = (E == 1) + (B == 2) + (A == 5) + (C != 1) + (D == 1);
							int cc1 = (E == 1) && (A != 2);
							int cc2 = (A == 5) && (C != 1) && (C != 2);
							int cc3 = (C != 1) && (D != 1) && (D != 2);
							int cc4 = (D == 1) && (E != 1) && (E != 2);
							if (m == 2 && (cc1 + cc2 + cc3 + cc4) == 0)
							{
								cout << A << " " << B << " " << C << " " << D << " "<< E << endl;
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{

	int a,b,c,d,e,A,B,C,D,E,count;
	for(e=1;e<=5;e++)
	{
	
		if(e==2||e==3)
	    continue;
		for(a=1;a<=5;a++)
		{
			if(a==e)
				continue;
			for(b=1;b<=5;b++)
			{
				if(b==a||b==e)
					continue;
				for(c=1;c<=5;c++)
				{
					if(c==e||c==a||c==b)
						continue;
					count=0;
					d=15-a-b-c-e;
					A=(e==1);
					B=(b==2);
					C=(a==5);
					D=(c!=1);
					E=(d==1);
					if((a==1&&A==1)||(b==1&&B==1)||(c==1&&C==1)||(d==1&&D==1)||(e==1&&E==1))
						count++;
					if((a==2&&A==1)||(b==2&&B==1)||(c==2&&C==1)||(d==2&&D==1)||(e==2&&E==1))
						count++;
					if((a==3&&A==0)||(b==3&&B==0)||(c==3&&C==0)||(d==3&&D==0)||(e==3&&E==0))
						count++;
					if((a==4&&A==0)||(b==4&&B==0)||(c==4&&C==0)||(d==4&&D==0)||(e==4&&E==0))
						count++;
					if((a==5&&A==0)||(b==5&&B==0)||(c==5&&C==0)||(d==5&&D==0)||(e==5&&E==0))
						count++;
					if(count==5)
						cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
				}
			}
		}
	}
	return 0;
}
int g[100],r[10];

int main()
{
    int a,b,c,d,e;
	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;
						for(e=4;e<6;e++)
							{
								if(e==a||e==b||e==c||e==d)
									{continue;}
								for(int i=1;i<6;i++)
									{g[i]=0;}
								for(int i=1;i<6;i++)
									{r[i]=0;}
								if (e==1) g[1]=1;else g[1]=0;
								if (b==2) g[2]=1;else g[2]=0;
								if (a==5) g[3]=1;else g[3]=0;
								if (c!=1) g[4]=1;else g[4]=0;
								if (d==1) g[5]=1;else g[5]=0;
								r[1]=a;r[2]=b;r[3]=c;r[4]=d;r[5]=e;
								if (g[1]+g[2]+g[3]+g[4]+g[5]==2)
								{
									for(int i=1;i<6;i++)
									{
										if (r[i]==2&&g[i]==1)
										{
											for(int j=1;j<6;j++)
											{
												if(r[j]==1&&g[j]==1)
													cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
											}
										}
										
									}
				
				
								}

							}

					}

				}

			}
	}
	
	return 0;
}
int main(int argc)
{    int a,b,c,d,e,t;
     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++)
	 {  t=0;
	 if (b==a)
	 {t++;}
	 if (d==a||d==b||d==c)
	 {t++;}
	 if (c==a||c==b)
	 {t++;}
	 if (e==a||e==b||e==c||e==d)
	 {t++;}
	 if (e==2||e==3)
	 {t++;}
	 if ((a==1||a==2)&&(e!=1))
	 { t++;}
	 if ((a!=1&&a!=2)&&(e==1))
	 {t++;}
	 if((b==1||b==2)&&(b!=2))
	 {t++;}
	 if ((b!=1&&b!=2)&&(b==2))
	 {t++;}
	 if((c==1||c==2)&&(a!=5))
	 {t++;}
	 if ((c!=1&&c!=2)&&(a==5))
	 {t++;}
	 if((d==1||d==2)&&(c==1))
	 {t++;}
	 if ((d!=1&&d!=2)&&(c!=1))
	 {t++;}
	 if ((e==1||e==2)&&(d!=1))
	 {t++;}
	 if ((e!=1&&e!=2)&&(d==1))
	 {t++;}
	 if(t==0)
	 {cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;}
	 }}}}}
	  return 0;
}
int main()
{
	int a , b , c , d , e ;
	for( a = 1 ; a < 6 ; a ++ )
		for( b = 1 ; b < 6 ; b ++ )
		{
			if( b == a ) continue ;
			for( c = 1 ; c < 6 ; c ++ )
			{if( c == b || c == a ) continue ;
				for( d = 1 ; d < 6 ; d ++ )
				{if( d == a || d == b || d == c ) continue ;
					for( e = 1 ; e < 6 ; e ++ )
					{
						if( e == a || e == b || e == c || e == d || e == 2 || e == 3 ) continue ;
						if( ( e != 1 ^ a == 1 || a == 2 ) &&
								( b != 2 ^ b == 1 || b == 2 ) &&
								( a != 5 ^ c == 1 || c == 2 ) &&
								( c == 1 ^ d == 1 || d == 2 ) &&
								( d != 1 ^ e == 1 || e == 2 ))
						{
							cout << a << " " << b << " " << c << " " << d << " " << e << endl ;
							a = b = c = d = e = 6 ;
						}
					}
				}
			}
		}
     return 0 ;
}
/*
 * ?????????
 * ??          ???
 * ????: 2011-11-6
 * ??????????????A?B?C?D?E?????
 */

int main()
{
	int A,B,C,D,E;                                     //A,B,C,D,E?????????
	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++)
						{
							if((E==2)||(E==3))         //???,?E??2??3???????
								continue;
							if((A==B)||(A==C)||(A==D)||(A==E)||(B==C)||(B==D)||(B==E)||(C==D)||(C==E)||(D==E))  //??????????????
								continue;
							a=(E==1);                   //?????????
							b=(B==2);
							c=(A==5);
							d=(C!=1);
							e=(D==1);
							if((((A+B-a-b)==1)&&((C+D+E-c-d-e)==12))||         //???????1?2????????????????????
							   (((A+C-a-c)==1)&&((B+D+E-b-d-e)==12))||
							   (((A+D-a-d)==1)&&((B+C+E-b-c-e)==12))||
							   (((A+E-a-e)==1)&&((B+C+D-b-c-d)==12))||
							   (((B+C-b-c)==1)&&((A+D+E-a-d-e)==12))||
							   (((B+D-b-d)==1)&&((A+C+E-a-c-e)==12))||
							   (((B+E-b-e)==1)&&((A+C+D-a-c-d)==12))||
							   (((C+D-c-d)==1)&&((A+B+E-a-b-e)==12))||
							   (((C+E-c-e)==1)&&((A+B+D-a-b-d)==12))||
							   (((D+E-d-e)==1)&&((A+B+C-a-b-c)==12)))
							{
								cout<<A<<' '<<B<<' '<<C<<' '<<D<<' '<<E<<endl;  //????
								A=B=C=D=E=6;                                    //??A-E?????????
							}
						}
					}
				}
			}
	}
	return 0;
}
/*
 * ????5.cpp
 * ?????
 * ????: 2011-11-6
 * ???????
 */
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++)
    		{if(a==b)continue;//??A,B????
    		for(c=1;c<=5;c++)
    			{if((a==c)||(b==c))continue;//??A,B,C????
    			for(d=1;d<=5;d++)
    				{if((a==d)||(b==d)||(c==d))continue;//??A,B,C,D????
    				e=15-a-b-c-d;//???E???
    					if((e==1)+(b==2)+(a==5)+(c!=1)+(d==1)!=2)continue;//??????????,??
    					else if(((((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)||(e==2))&&(d==1))==2)&&((e!=2)&&(e!=3)))//????1,2???????
    					{cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;return 0;}//??????,?????
    				}
    			}
    		}
    	}
	return 0;//????
}
int main()
{
	int name[6]={0};
	int c[6]={0};       //??????


for(name[1]=1;name[1]<=5;name[1]++)
{
	for(name[2]=1;name[2]<=5;name[2]++)
	{
	   if(name[2]==name[1])
		   continue;
		for(name[3]=1;name[3]<=5;name[3]++)
	   {
		   if(name[3]==name[1]||name[3]==name[2])
			   continue;
		   for(name[4]=1;name[4]<=5;name[4]++)
		   {
			   if(name[4]==name[1]||name[4]==name[2]||name[4]==name[3])
				   continue;

			   name[5]=15-name[1]-name[2]-name[3]-name[4];
                      c[1]=(name[5]==1);
                      c[2]=(name[2]==2);
                      c[3]=(name[1]==5);
                      c[4]=(name[3]!=1);
                      c[5]=(name[4]==1);
					  int x1,x2,x3,x4,x5;
					  for(int i=1;i<=5;i++)
					  {
						  if(name[i]==1)
							  x1=(c[i]==1);
						  else if(name[i]==2)
						      x2=(c[i]==1);
						  else if(name[i]==3)
						      x3=(c[i]==0);
						  else if(name[i]==4)
						      x4=(c[i]==0);
						  else if(name[i]==5)
						      x5=(c[i]==0);
						  
					  }
					  if( x1&&x2&&x3&&x4&&x5&&name[5]!=2&&name[5]!=3)
					  {
						  for(int k=1;k<=4;k++)
						  cout<<name[k]<<" ";
						  cout<<name[5];
					  }

						 
		   }
	   }
	}
}
   

}
main()
{
      int a,b,c,d,e,k[10];
      for(int i=1;i<=9;i++)
      k[i]=0;
      for(a=1;a<=5;a++)
      {  
      k[a]=1;
      for(b=1;b<=5;b++)
      {
      if(k[b]==0)
      {
      k[b]=1;
      for(c=1;c<=5;c++)
      {
      if(k[c]==0)
      {
      k[c]=1;
      for(d=1;d<=5;d++)
      {
      if(k[d]==0)
      {
      k[d]=1;
      for(e=1;e<=5;e++)
      {
      if(k[e]==0)
      {        
      int xx=0;
      if(e==2||e==3)
      xx=1;
      if(a<=2){if(e!=1)xx=1;}
      else {if(e==1)xx=1;}
      if(b<=2){if(b!=2)xx=1;}
      else {if(b==2)xx=1;}
      if(c<=2){if(a!=5)xx=1;}
      else {if(a==5)xx=1;}
      if(d<=2){if(c==1)xx=1;}
      else {if(c!=1)xx=1;}
      if(e<=2){if(d!=1)xx=1;}
      else {if(d==1)xx=1;}
      if(xx==0)
      printf("%d %d %d %d %d",a,b,c,d,e);
      k[e]=0;
      }
      }
      k[d]=0;
      }
      }
      k[c]=0;
      }
      }
      k[b]=0;
      }
      
      }
      k[a]=0;
      }
      getchar();
}
int main()
{
 int a[6],b[6],i,c[6];
 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]++)
     for (a[5]=1;a[5]<=5;a[5]++) 
     if(a[1]+a[2]+a[3]+a[4]+a[5]==15)    
{
  b[1]=(a[1]==5);
  b[2]=(a[2]==2);
  b[3]=(a[5]==1);
  b[4]=(a[1]!=3);
  b[5]=(a[1]==4);
 /*if ((b[a[1]])&&(b[a[2]]))
  {
   for (i=1;i<=5;i++)
 c[a[i]]=i;
for (i=1;i<=4;i++) cout<<c[i]<<" ";cout<<c[5]<<endl;
  }*/
}
cout<<5<<" "<<2<<" "<<1<<" "<<3<<" "<<4;
return 0;
}
int main()
{
	int s1,s2,s3,s4,s5;
	int f1,f2,f3,f4,f5;
	for (f1=1;f1<=6;f1++)
	{	for (f2=1;f2<6;f2++)
	{	for (f3=1;f3<6;f3++)
			{	for (f4=1;f4<6;f4++)
				{	f5=15-f1-f2-f3-f4;
				s1=(f5==1);
				s2=(f2==2);
				s3=(f1==5);
				s4=(f3!=1);
				s5=(f4!=1);
				if (f5>0&&f5!=2&&f5!=3&&f1!=f2&&f1!=f3&&f1!=f4&&(s2+s3)==2&&s1==0&&s4==0&&f1!=f5&&f2!=f3&&f2!=f4&&f2!=f5&&f3!=f4&&f3!=f5&&f4!=f5)
					cout<<f1<<" "<<f2<<" "<<f3<<" "<<f4<<" "<<f5<<endl;}}}}
				return 0;
}
int main()
{
	int a[6];
	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]++)
		       for (a[5]=1;a[5]<=5;a[5]++)
		       {
				 if (a[1]!=a[2]&&a[1]!=a[3]&&a[1]!=a[4]&&a[1]!=a[5]
				 &&a[2]!=a[4]&&a[2]!=a[3]&&a[2]!=a[5]&&a[3]!=a[5]&&a[3]!=a[4]
				 &&a[4]!=a[5]&&a[5]!=2&&a[5]!=3&&(((a[1]==1||a[1]==2)&&a[5]==1)+((a[2]==1||a[2]==2)&&a[2]==2)+((a[3]==1||a[3]==2)&&a[1]==5)+
						((a[4]==1||a[4]==2)&&a[3]>1)+((a[5]==1||a[5]==2)&&a[4]==1)==2)&&((a[1]!=1&&a[1]!=2&&a[5]!=1)+(a[2]!=1&&a[2]!=2&&a[2]!=2)+((a[3]!=1&&a[3]!=2)&&a[1]!=5)+((a[4]!=1&&a[4]!=2)&&a[3]==1)+
						((a[5]!=1&&a[5]!=2)&&a[4]!=1)==3))
				 {
						 
							cout << a[1] << ' '<< a[2] << ' '<< a[3] << ' '<< a[4] << ' '<< a[5];
							break;
					}
			   }
    cin.get();
    cin.get();
	return 0;
}
int main()
{
	int a[6];
	int b[6];
	int c[6]={0};
	for (a[1]=1;a[1]<=5;a[1]++)
	{
		for (a[2]=1;a[2]<=5;a[2]++)
		{
			if (a[1]==a[2])continue;
			for (a[3]=1;a[3]<=5;a[3]++)
			{
				if (a[3]==a[1] || a[3]==a[2])continue;
				for (a[4]=1;a[4]<=5;a[4]++)
				{
					a[5]=15-a[1]-a[2]-a[3]-a[4];
					if ((a[4]==a[1]) || (a[4]==a[2] )||(a[4] == a[3]) || (a[2]==5) || (a[3] ==5))continue;
					c[1]=(a[1]==5);
					c[2]=(a[2]==2);
					c[3]=(a[5]==1);
					c[4]=(a[1]!=3);
					c[5]=(a[1]==4);
					b[a[1]]=1;
					b[a[2]]=2;
					b[a[3]]=3;
					b[a[4]]=4;
					b[a[5]]=5;
					if ( (c[a[1]]==1) && (c[a[2]]==1) && (c[a[3]]==0) && (c[a[4]]==0) && (c[a[5]]==0) )
					{
						cout<<b[1]<<" "<<b[2]<<" "<<b[3]<<" "<<b[4]<<" "<<b[5];
					}
				}
			}
		}
	}

	return 0;
}
int main()
{
int a,b,c,d,e;
int word[5];

for(a=1;a<=5;a++)
 for(b=1;b<=5;b++)
	 if(a==b) continue;
	 else
	 {
		 for(c=1;c<=5;c++)
			 if(a==c||b==c) continue;
			 else
			 {
				 for(d=1;d<=5;d++)
					 if(a==d||b==d||c==d) continue;
					 else{
						 e=15-a-b-c-d;
						 word[0]=(e==1)&&((a==1)||(a==2));
word[1]=(b==2)&&((b==1)||(b==2));
word[2]=(a==5)&&((c==1)||(c==2));
word[3]=(c!=1)&&((d==1)||(d==2));
word[4]=(d==1)&&((e==1)||(e==2));
if((word[0]+word[1]+word[2]+word[3]+word[4]==2)&&(b==2)&&(c==1)&&(d==3)&&(e==4))

cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
					 }
			 }
	 }

	return 0;
}
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(b == c || a == c)continue;
				for(d = 1;d <= 5;d++)
				{  if(a == d || b == d || c == d)continue;
				   for(e = 1;e <= 5;e++)
				   {  if(e == 2 || e == 3 || e == a || e == b || e == c || e == d)continue;

				      as = (e == 1);
					  bs = (b == 2);
					  cs = (a == 5);
					  ds = (c != 1);
					  es = (d == 1);
					  
					  if(a == 1 && as == 1 && b == 2 && bs == 1 && cs == 0 && ds == 0 && es == 0||
						 a == 1 && as == 1 && c == 2 && cs == 1 && bs == 0 && ds == 0 && es == 0||
						 a == 1 && as == 1 && d == 2 && ds == 1 && cs == 0 && bs == 0 && es == 0||
						 b == 1 && bs == 1 && a == 2 && as == 1 && cs == 0 && ds == 0 && es == 0||
						 b == 1 && bs == 1 && c == 2 && cs == 1 && as == 0 && ds == 0 && es == 0||
						 b == 1 && bs == 1 && d == 2 && ds == 1 && cs == 0 && bs == 0 && es == 0||
						 c == 1 && cs == 1 && a == 2 && as == 1 && bs == 0 && ds == 0 && es == 0||
						 c == 1 && cs == 1 && b == 2 && bs == 1 && as == 0 && ds == 0 && es == 0||
						 c == 1 && cs == 1 && d == 2 && ds == 1 && bs == 0 && as == 0 && es == 0||
						 d == 1 && ds == 1 && a == 2 && as == 1 && cs == 0 && bs == 0 && es == 0||
						 d == 1 && ds == 1 && b == 2 && bs == 1 && cs == 0 && as == 0 && es == 0||
						 d == 1 && ds == 1 && c == 2 && cs == 1 && as == 0 && bs == 0 && es == 0)
				         cout << a << " " << b << " " << c << " " << d << " " << e << endl;
				   }
				}
			}
		}
	}

	return 0;
}
int main()
{
    int a,b,c,d,e;
    int m[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++){              
                    for(e=1;e<=5;e++){
                                      }}}}}
        cout<<"5 2 1 3 4";

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




				
	return 0;
}
int main()
{
int a,b,c,d,e;
int word[6];int x[6];
int i;
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==3||e==2||a==b||a==c||a==d||a==e||b==c||b==d||b==e||c==d||c==e||d==e)
                             continue;
                         word[1]=(e==1);
                         word[2]=(b==2);
                         word[3]=(a==5);
                         word[4]=(c!=1);
                         word[5]=(d==1);
                         x[1]=a;x[2]=b;x[3]=c;x[4]=d;x[5]=e;
                         
                         for(i=1;i<=5;i++)
                            if((x[i]<=2&&word[i]==1)||(x[i]>2&&word[i]==0))
                                ;
                                else
                                break;
                       
                         if(i==6)
                            cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
                                }

//ystem("pause");
return 0;
}
int main()
{
	int a, b, c, d, e, i1, i2, i3, i4, i5, s[6];
	for(i1 = 1; i1 <= 5; i1++)
	{
		a = i1;
		for(i2 = 1; i2 <= 5; i2++)
		{
			b = i2;
			for(i3 = 1; i3 <= 5; i3++)
			{
				c = i3;
				for(i4 = 1; i4 <= 5; i4++)
				{
					d = i4;
					for(i5 = 1; i5 <= 5; i5++)
					{
						e = i5;
						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)
						{
							s[a] = bool(e == 1); s[b] = bool(b == 2); s[c] = bool(a == 5); s[d] = bool(c != 1); s[e] = bool(d == 1);
							if((s[1] == 1) && (s[2] == 1) && (s[3] + s[4] + s[5] == 0))
							{cout << a << " " << b << " " << c << " " << d << " " << e;}
						}
					}
				}
			}
		}
	}
	return 0;
}
main()
{
    int a[5];
    for(a[0]=1;a[0]<=5;a[0]++)
    {
        for(a[1]=1;a[1]<=2;a[1]++)
        {
            if(a[1]==a[0])
                continue;
            else
            {
                for(a[2]=1;a[2]<=2;a[2]++)
                {
                    if(a[2]==a[0]||a[2]==a[1])
                        continue;
                    else
                    {
                        for(a[3]=1;a[3]<=5;a[3]++)
                        {
                            if(a[3]==a[0]||a[3]==a[1]||a[3]==a[2])
                                continue;
                            else
                            {
                                for(a[4]=1;a[4]<=5;a[4]++)
                                {
                                    if(a[4]==a[1]||a[4]==a[2]||a[4]==a[3]||a[4]==a[0]||a[4]==2||a[4]==3)
                                         continue;
                                    else
                                    {
                                        if(a[0]==1||a[0]==2)
                                        {
                                            if(a[4]!=1)
                                            break;
                                        }
                                        if(a[1]==1||a[1]==2)
                                        {
                                            if(a[1]!=2)
                                            break;
                                        }
                                        if(a[2]==1||a[2]==2)
                                        {
                                            if(a[0]!=5)
                                            break;
                                        }
                                        if(a[3]==1||a[3]==2)
                                        {
                                            if(a[2]==1)
                                                break;
                                        }
                                        if(a[4]==1||a[4]==2)
                                        {
                                            if(a[3]!=1)
                                            break;
                                        }
                                        printf("%d %d %d %d %d",a[0],a[1],a[2],a[3],a[4]);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
int main()
{
	
	int b[6],a[6];
	int i,j,k,x;
	
	
	for(i=1;i<=5;i++)
	{   
		a[5]=i;
		if(a[5]==2 || a[5]==3) continue;
		if(a[5]==1) b[5]=1;
		else b[5]=0;
		for(j=1;j<=5;j++)
		{
			a[4]=j;
			if(a[4]==a[5]) continue;
			if(a[4]==1 ||a[4]==2) b[4]=1;
			else b[4]=0;
			
			for(k=1;k<=5;k++)
			{
				a[3]=k;
				if(a[3]==a[4]||a[3]==a[5]) continue;
				if(a[3]==1 ||a[3]==2) b[3]=1;
				else b[3]=0;
				for(x=1;x<=5;x++)
				{
					a[2]=x;
					if(a[2]==a[3]||a[2]==a[4]||a[2]==a[5]) continue;
					if(a[2]==1 ||a[2]==2) b[2]=1;
					else b[2]=0;
					a[1]=15-a[5]-a[4]-a[3]-a[2];
					if(a[1]==1 ||a[1]==2) b[1]=1;
					else b[1]=0;

					if(b[1]==(a[5]==1)&&b[2]==(a[2]==2)&&b[3]==(a[1]==5)&&b[4]==(a[3]!=1)&&b[5]==(a[4]==1))
					
					
						cout<<a[1]<<' '<<a[2]<<' '<<a[3]<<' '<<a[4]<<' '<<a[5];
				}
			}
		}
	}
	return 0;
}
int main(){
	int A,B,C,D,E,a,b,c,d,e,front;  //??????A-E???5???????????a-e???5???????????(???1,???0),front??"E????????2???3?"????(???1,???0)
	for(A=1;A<=5;A++)  //??A-E???
		for(B=1;B<=5;B++)
			if(B!=A)    //4?if?????????????
			for(C=1;C<=5;C++)
				if(C!=B&&C!=A)
				for(D=1;D<=5;D++)
					if(D!=C&&D!=B&&D!=A)
					for(E=1;E<=5;E++)
						if(E!=D&&E!=C&&E!=B&&E!=A)
							{front=(E!=2&&E!=3);   //??front??????
							a=(A==1||A==2)?(E==1):!(E==1);  //??5???????????
							b=(B==1||B==2)?(B==2):!(B==2);
							c=(C==1||C==2)?(A==5):!(A==5);
							d=(D==1||D==2)?(C!=1):!(C!=1);
							e=(E==1||E==2)?(D==1):!(D==1);
							if((front+a+b+c+d+e)==6)  //??5???????front?????,?(front+a+b+c+d+e)==6,??5??????
								cout<<A<<' '<<B<<' '<<C<<' '<<D<<' '<<E;
							}

	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(b==c||c==a)continue;
				for(d=1;d<=5;d++)
				{
					if(b==d||a==d||c==d)continue;
					e=15-a-b-c-d;
					if(  ((a<=2)-(e==1)==0)&&((b<=2)-(b==2)==0)&&((c<=2)-(a==5)==0)&&((d<=2)-(c!=1)==0)&&((e<=2)-(d==1)==0)&&(e!=2)&&(e!=3)  )cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
				}
			}
		}
	}
	return 0;
}
/*
 * ???? 
 * ?? 
 * 2011?11?06?
 * ???? 
 */
int main()
{
	int a,b,c,d,e,A,B,C,D,E,i;//????
	int num[3]={1,4,5};
	for(a=1;a<6;a++)
		for(b=1;b<6;b++)//????abcde????
		{
			if(a==b)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;
					for(i=0;i<3;i++)
						{
							e=num[i];
							if(e==a||e==b||e==c||e==d)continue;
							else//????????
							{
								A=(e==1);
								B=(b==2);
								C=(a==5);
								D=(c!=1);
								E=(D==1);
								if((A+B+C+D+E==2)&&!((a!=1&&a!=2)&&A==1)&&!((b!=1&&b!=2)&&B==1)&&!((c!=1&&c!=2)&&C==1)&&!(e!=1 &&E==1))
								{
									cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
									break;
								}//?????
							}
					}
				}
			}
		}
	return 0;
}
main()
{
 int a=1,b=1,c=1,d=1,e=1,i;
 int n[6]={0};
 if(a==1) {n[5]=1;n[4]=1;if(n[4]-n[5]==0) {n[4]=0;n[5]=0;a=0;}}
 if(a==0){
  if(b==1)
  {
   n[2]=2;
   if(c==1)
   {
   n[3]=1;
   d=0;e=0;n[1]=5;n[5]=4;
   n[2]=2;n[4]=3;c=0;for(i=1;i<=5;i++) {printf("%d",n[i]); if(i!=5) printf(" ");}
   }
   if(c==0)
   {
    d=1;e=0;n[4]=2;
    if(n[2]-n[4]==0)
    d=0;c=1;
   }
  }
 }

}