semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[6],i,sum;
	for(a[1]=1;a[1]<=5;a[1]++)
	{
		for(a[2]=1;a[2]<=5;a[2]++)
		{
			if(a[2]!=a[1])
			{
			  for(a[3]=1;a[3]<=5;a[3]++)
			  {
				  if(a[3]!=a[1]&&a[2]!=a[3])
				  {
				   for(a[4]=1;a[4]<=5;a[4]++)
				    {
					   if(a[4]!=a[3]&&a[4]!=a[2]&&a[4]!=a[1])
					   {
					     for(a[5]=1;a[5]<=5;a[5]++)
						 {
							 if((a[5]==15-a[1]-a[2]-a[3]-a[4])&&a[5]!=2&&a[5]!=3)
							 {
								
								 sum=0;
								 if(a[5]==1&&(a[1]==1||a[1]==2)) sum+=1;
								 if(a[2]==2) sum+=1;
								 if(a[1]==5&&(a[3]==1||a[3]==2)) sum+=1;
								 if(a[3]!=1&&(a[4]==1||a[4]==2)) sum+=1;
								 if(a[4]==1&&(a[5]==1||a[5]==2)) sum+=1;
								 if(sum==2 && ((a[5]== 1) + (a[2]==2)+(a[3]!=1)+(a[4]==1)+(a[1]==5) == 2))
								 {
									 for(i=1;i<=4;i++)
										 cout<<a[i]<<" ";
									 cout<<a[5]<<endl;
								 }
							 }
						 }
					   }
				   }
				 }
			  }
			}
		}
	}

	return 0;
}
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&&b==2&&c==1&&(a==5)==1&&d!=1&&e!=2&&e!=3)
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
					}
			
	

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




					   }
					
				}
		  }
	}


    return 0;
}
int hash[6] = {0};
int rank[6] = {0};
int ans[6] = {0};
int flag[6] = {0};

void find(int n)
{
	if (n == 6)
	{
		int sign = 1;
				
		flag[1] = (rank[5] == 1);
		flag[2] = (rank[2] == 1) || (rank[2] == 2);
		flag[3] = (rank[1] == 5);
		flag[4] = (rank[3] != 1);
		flag[5] = (rank[4] == 1);

		for (int i = 1; i <= 5; i ++)
		{
			if (rank[i] > 2) flag[i] ^= 1;
			sign = sign & flag[i];
		}

		if (sign) 
			for (int i = 1; i <= 5; i++)
				ans[i] = rank[i];

		return;
	}

	for (int i = 1; i <= 5; i ++) if (hash[i] == 0)
	{
		hash[i] = 1;
		rank[n] = i;
		
		if ( (n != 5) || ( (n == 5) && ( i != 2) && (i != 3) ) )
			find(n + 1);
		
		hash[i] = 0;
		rank[n] = 0;
	}
}

int main()
{
	find(1);
	cout << ans[1];
	for (int i = 2; i <= 5; i ++) cout << ' ' << ans[i];
}
int main()
{
	int a[2][5]={0};
	for (a[0][0]=1;a[0][0]<=5;a[0][0]++)
		for (a[0][1]=1;a[0][1]<=5;a[0][1]++)
			for (a[0][2]=1;a[0][2]<=5;a[0][2]++)
				for (a[0][3]=1;a[0][3]<=5;a[0][3]++)
					for (a[0][4]=1;a[0][4]<=5;a[0][4]++)
					{
						if ((a[0][4]==2)||(a[0][4]==3))
							continue ;
						if (a[0][0]*a[0][1]*a[0][2]*a[0][3]*a[0][4]!=120)
							continue;
						a[1][0]=(a[0][4]==1),a[1][1]=(a[0][1]==2);
	                    a[1][2]=(a[0][0]==5),a[1][3]=(a[0][2]!=1),a[1][4]=(a[0][3]==1);
						if (a[1][0]+a[1][1]+a[1][2]+a[1][3]+a[1][4]!=2)
							continue ;
						for (int i = 0 ; i < 4 ; i ++)
							for (int j = i+1 ; j <= 4 ; j ++)
							if ((((a[0][i]==1)&&(a[0][j]==2))||((a[0][i]==2)&&(a[0][j]==1)))&&(a[1][i]+a[1][j]==2))
							{
								cout << a[0][0]<<" "<<a[0][1]<<" "<<a[0][2]<<" "<<a[0][3]<<" "<<a[0][4];
								break ;
							}
					}

		return 0 ;
}
int main()
{
    int a,b,c,d,e;
    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;
              as=(e==1);
              bs=(b==2);
              cs=(a==5);
              ds=(c!=1);
              es=(d==1);
              if(e!=2&&e!=3)
              {if((a==1&&b==2)||(a==2&&b==1)){as=1;bs=1;}
              if((a==1&&c==2)||(a==2&&c==1)){as=1;cs=1;}              
              if((a==1&&d==2)||(a==2&&d==1)){as=1;ds=1; } 
             // if((a==1&&e==2)||(a==2&&e==1))as=1;es=1;bs+cs+ds=0;  
             // if((b==1&&e==2)||(b==2&&e==1))bs=1;es=1;as+cs+ds=0; 
              if((b==1&&c==2)||(b==2&&c==1)){bs=1;cs=1;} 
              if((b==1&&d==2)||(b==2&&d==1)){bs=1;ds=1;} 
              if((c==1&&d==2)||(c==2&&d==1)){cs=1;ds=1;}
             // if((c==1&&e==2)||(c==2&&e==1))cs=1;es=1;as+bs+ds=0;
             // if((d==1&&e==2)||(d==2&&e==1))ds=1;es=1;as+bs+cs=0;
             if(as+bs+cs+ds+es==2)
             
             
              {A=a;
              B=d;
              C=c;
              D=b;
              E=e;}}
              }
           }
         }
       }
       cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
       int ss;cin>>ss;
       return 0;
}
int main()
{
	int a,b,c,d,e,x[6],i,t=0;
	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
							{
								for(e=1;e<=5;e++)
									if(e==a||e==b||e==c||e==d||e==2||e==3)
										continue;							
								else
								{
									x[1]=(e==1);
									x[2]=(b==2);
									x[3]=(a==5);
									x[4]=(c!=1);
									x[5]=(d==1);
									if(a==1&&x[1]==1||a==2&&x[1]==1)
										t+=1;
									if(b==1&&x[2]==1||b==2&&x[2]==1)
										t+=1;
									if(c==1&&x[3]==1||c==2&&x[3]==1)
										t+=1;
									if(d==1&&x[4]==1||d==2&&x[4]==1)
										t+=1;
									if(e==1&&x[5]==1||e==2&&x[5]==1)
										t+=1;
									if(t==2)
									{
										if(x[1]+x[2]+x[3]+x[4]+x[5]==2)
										{
											cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
											return 0;
										}
										else{t=0;

											continue;}
									}
									if(t!=2)
									{
										t=0;
										continue;
									}
								}
							}
						}
				}
		}
		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+c+d+e == 2)
						{
							if(((A == 1 && B == 2)||(A == 2 && B == 1)) && a==1 && b==1 && c==0 && d==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((A == 1 && C == 2)||(A == 2 && C == 1)) && a==1 && c==1 && b==0 && d==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((A == 1 && D == 2)||(A == 2 && D == 1)) && a==1 && d==1 && b==0 && c==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((A == 1 && E == 2)||(A == 2 && E == 1)) && a==1 && e==1 && b==0 && c==0 && d==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((B == 1 && C == 2)||(B == 2 && C == 1)) && b==1 && c==1 && a==0 && d==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((B == 1 && D == 2)||(B == 2 && D == 1)) && b==1 && d==1 && a==0 && c==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((B == 1 && E == 2)||(B == 2 && E == 1)) && b==1 && e==1 && a==0 && c==0 && d==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((C == 1 && D == 2)||(C == 2 && D == 1)) && c==1 && d==1 && a==0 && b==0 && e==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((C == 1 && E == 2)||(C == 2 && E == 1)) && c==1 && e==1 && a==0 && b==0 && d==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
							if(((D == 1 && E == 2)||(D == 2 && E == 1)) && d==1 && e==1 && a==0 && b==0 && c==0 && (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))
								cout << A << " " << B << " " << C << " " << D << " " << E << endl;
						}
					}
	return 0;
}
int main()
{
	int words[6],a,b,c,d,e,rank[6];

	for(a=1;a<6;a++)
	{
		for(b=1;b<6;b++)
		{
			if(a==b) continue;
			for(c=1;c<6;c++)
			{
				if(a==c||b==c)continue;
				for(d=1;d<6;d++)
				{
					if(a==d||b==d||c==d)continue;
					for(e=1;e<6;e++)
					{
						if(a==e||b==e||c==e||d==e)continue;
						{
							words[a]=(e==1);
							words[b]=(b==2);
							words[c]=(a==5);
							words[d]=(c!=1);
							words[e]=(d==1);
							if((words[a]+words[b]+words[c]+words[d]+words[e])==2&&((e!=2)+(e!=3))==2)
							{
								rank[a]=a;rank[b]=b;rank[c]=c;rank[d]=d;rank[e]=e;
								if(words[rank[1]]+words[rank[2]]==2)
									cout <<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
								
							}
						}
					}
				}
			}
		}
		
	}
   return 0;
}
int main()
{
    int a, b ,c, d , e;
    int s[5]={0};
    for(a=0;a<5;a++)
    {
                    for(b=0;b<5;b++)
                    {
                                    if(b==a)
                                    continue;
                                    //cout<<"kkk";
                                    for(c=0;c<5;c++)
                                    {
                                                    if(b==c||c==a)
                                                    continue;
                                                    //cout<<"sss";
                                                    for(d=0;d<5;d++)
                                                    {
                                                                    if(d==c||d==b||d==a)
                                                                    continue;
                                                                    //cout<<"sasas";
                                                                    e=10-a-b-c-d;
                                                                    if(e==1||e==2)
                                                                    break;
                                                                    else
                                                                    s[a]=(e==0);
                                                                    s[b]=(b==1);
                                                                    s[c]=(a==4);
                                                                    s[d]=(c!=0);
                                                                    s[e]=(d==0);
                                                                    if(s[0]+s[1]==2&&s[2]+s[3]+s[4]==0)
                                                                    cout<<a+1<<" "<<b+1<<" "<<c+1<<" "<<d+1<<" "<<e+1<<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++)
					{
					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)) continue;
					A=(e==1);
					B=(b==2);
					C=(a==5);
					D=(c!=1);
					E=(d==1);
					if((A+B+C+D+E)!=2) continue;
					if((a*A+b*B+c*C+d*D+e*E)>=4) continue;
					cout <<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
					return 0;
					}
}
int main()
{
	int A,B,C,D,E,y=0;
	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)
						{
							y=0;
							if ( ( (A==1||A==2) && E==1 )==1) y=y+1;
							else if ( A!=1 && A!=2 && E!=1) y=y+1;
							if( ( (B==1||B==2) && B==2 )==1) y=y+1;
							else if ( B!=1 && B!=2 &&B!=2) y=y+1;
							if( ( (C==1||C==2) && A==5 )==1) y=y+1;
							else if ( C!=1 && C!=2 && A!=5) y=y+1;
							if( ( (D==1||D==2) && C!=1 )==1) y=y+1;
							else if ( D!=1 && D!=2 && C==1) y=y+1;
							if( ( (E==1||E==2) && D==1 )==1) y=y+1;
							else if ( E!=1 && E!=2 && D!=1) y=y+1;
							if (y==5)  	cout<< A <<' '<< B <<' '<< C <<' '<< D <<' '<<E<<endl;
						}
					}



return 0;
}
int main()
{
	int a,b,c,d,e;
	int pa=0,pb=0,pc=0,pd=0,pe=0;
	int la,lb,lc,ld,le;
	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 ) continue;
						
						la=(e==1);lb=(b==2);lc=(a==5);ld=(c!=1);le=(d==1);
						if ( la+lb+lc+ld+le == 2 && a!=c&&a!=d&&c!=d&&b!=c&&b!=d&&a!=e&&d!=e&&c!=e )
						{
							if ( (c==1&&lc==1&&b==2&&lb==1)||(c==1&&lc==1&&d==2&&ld==1)||(d==1&&ld==1&&b==2&&lb==1)||
								(d==1&&ld==1&&c==2&&lc==1) )
							{pa=a;pb=b;pc=c;pd=d;pe=e;}
						}
						
					}
				}
			}
		}
	}
	cout << pa << " " << pb << " " << pc << " " << pd << " " << pe <<endl;
	return 0;
}
int main()
{
	int a ,b ,c ,d ,e , count;
	count=0;
	for (a=1;a<=5;a++)
	{
		for (b=1;b<=5;b++)
		{
	
		     for (c=1;c<=5;c++)
			{
					
			     for (d=1;d<=5;d++)
				 {
					 
					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 && e!=2 && e!=3)
						{
							if (a==1||a==2)
							{
								if(e==1)
								   count++;
							}
							else
							{
								if(e!=1)
									count++;
							}
							if (b==1||b==2)
							{
								if(b==2)
									count++;
							}
							else 
							{
								if(b!=2)
									count++;
							}
							if (c==1||c==2)
							{
								if(a==5)
									count++;
							}
							else 
							{
								if(a!=5)
									count ++;
							}
							if (d==1||d==2)
							{
								if(c!=1)
									count++;
							}
							else 
							{
								if(c==1)
									count++;
							}
							if (e==1)
							{
								if(d==1)
									count++;
							}
							else 
							{
								if(d!=1)
									count++;
							}
							if (count==5)
								cout << a << ' '<< b << ' ' << c<<' '<<d<<' '<<e<<endl;
							count=0;
						}
					}
				 }
			 }
		}
	}


	return 0;

}
/*
 * 1.cpp
 *
 *  Created on: 2011-11-6
 *      Author: ???
 *      1100012870
 */
int main()
{
	char a[6],b[6]={' ','A','B','C','D','E'};   //a???????
	int c[6];
	int i,j,k,l,m,w;

	for(i=1;i<=5;i++)                  //??5???
		for(j=1;j<=5;j++){
			if(i==j)continue;
			for(l=1;l<=5;l++){
				if(i==l)continue;
				if(j==l)continue;
				for(k=1;k<=5;k++){
					if(i==k)continue;
					if(j==k)continue;
					if(l==k)continue;
					for(m=1;m<=5;m++){
						if(i==m)continue;
						if(j==m)continue;
						if(l==m)continue;
						if(k==m)continue;

						a[1]=b[i];          //???a????????????
						a[2]=b[j];
						a[3]=b[l];
						a[4]=b[k];
						a[5]=b[m];

						c[1]=(a[1]=='E');    //?????5??????
						c[2]=(a[2]=='B');
						c[3]=(a[5]=='A');
						c[4]=(a[1]!='C');
						c[5]=(a[1]=='D');

						if(c[i]!=1 || c[j]!=1) continue;    //???????????????
						if(c[l]!=0 || c[k]!=0 || c[m]!=0)continue;  //??????????????

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

int main(){
	int a,b,c,d,e;//a,b,c,d,e?????????
	for(a=1;a<6;a++)//??
		for(b=1;b<6;b++){
			if(b!=a){
			for(c=1;c<6;c++){
				if(c!=a&&c!=b){
				for(d=1;d<6;d++){
					if(d!=a&&d!=b&&d!=c){
						e=15-a-b-c-d;//??????
						if((e!=2)&&(e!=3)&&((e==1)+(a!=1)+(a!=2)==2)&&((b==2)+(b!=1)+(b!=2)==2)&&((a==5)+(c!=1)+(c!=2)==2)&&((c!=1)+(d!=1)+(d!=2)==2)&&((d==1)+(e!=1)+(e!=2)==2)){
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
						}
					}
				}
				}
			}
		}
		}
	return 0;
}