semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int A[5],B[5],C[5],D[5],E[3]={1,4,5};
    int i,j,k,l,m,i1,j1,k1,l1,m1;
    for(i=0;i<=4;i++)
    {
        A[i]=i+1;
        if(i==4) 
        k1 = 1;
        else
        k1 = 0;
        {
            for(j=0;j<=4;j++)
            {
                B[j]=j+1;
                if(A[i]==B[j])
                {
                    continue;
                }
                if(j==1)
                j1 = 1;
                else
                j1 = 0;
                for(k=0;k<=4;k++)
                {
                    C[k]=k+1;
                    if(A[i]==C[k]||B[j]==C[k])
                    {
                        continue;
                    }
                    if(k!=0)
                    l1 = 1;
                    else
                    l1 = 0;
                    for(l=0;l<=4;l++)
                    {
                        D[l]=l+1;
                        if(A[i]==D[l]||B[j]==D[l]||C[k]==D[l])
                        {
                            continue;
                        }
                        if(l==0)
                        m1 = 1;
                        else
                        m1 = 0;
                        for(m=0;m<=2;m++)
                        {
                            if(A[i]==E[m]||B[j]==E[m]||C[k]==E[m]||D[l]==E[m])
                            {
                                continue;
                            }
                            i1 + j1 + l1 + m1 + k1 == 2;
                            if(A[i]==5&&B[j]==2&&C[k]==1&&D[l]==3&&E[m]==4)
                            {
                            cout << A[i] << " " << B[j] << " " << C[k] << " " << D[l] << " " << E[m] <<endl;
                            break;
                            }
                        }
                    }
                }
            }
        }
    }
                            return 0;    
}
int main()
{
	int a[6],w[6],rank[6],i;
	for(a[0]=1;a[0]<=5;a[0]++)
	{
		for(a[1]=1;a[1]<=5;a[1]++)
		{
			if(a[0]==a[1])
				continue;
			for(a[2]=1;a[2]<=5;a[2]++)
			{
				if(a[0]==a[2]||a[1]==a[2])
				    continue;
				for(a[3]=1;a[3]<=5;a[3]++)
				{
					if(a[0]==a[3]||a[1]==a[3]||a[2]==a[3])
				        continue;
					for(a[4]=1;a[4]<=5;a[4]++)
					{
						if(a[0]==a[4]||a[1]==a[4]||a[2]==a[4]||a[3]==a[4])
				            continue;
						if(a[4]!=2&&a[4]!=3){
						w[0]=(a[4]==1);
						w[1]=(a[1]==2);
						w[2]=(a[0]==5);
						w[3]=(a[2]!=1);
						w[4]=(a[3]==1);
						rank[a[0]]=0;
						rank[a[1]]=1;
						rank[a[2]]=2;
						rank[a[3]]=3;
						rank[a[4]]=4;
						if(w[rank[1]]==1&&w[rank[2]]==1&&w[rank[3]]==0&&w[rank[4]]==0&&w[rank[5]]==0)
							cout<<a[0]<<' '<<a[1]<<' '<<a[2]<<' '<<a[3]<<' '<<a[4];}
					}
				}
			}
		}
	}
	return 0;
}
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==b||c==a) 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){
					if(e!=3&&e!=2&&
						(a==1||a==2)==(e==1)&& //??????1?2?
						(b==1||b==2)==(b==2)&& //=???????
						(c==1||c==2)==(a==5)&&
						(d==1||d==2)==(c!=1)&&
						(e==1||e==2)==(d==1))
				cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;}
		    	}
			}
	  }
return 0;
}
int main()
{
    int a,b,c,d,e,f;
    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=4;e<6;e++)
                     if((a-b)*(a-c)*(a-d)*(a-e)*(b-c)*(b-d)*(b-e)*(c-d)*(c-e)*(d-e)!=0)
                     {
                         f=1;
                         if(a<3)
                             if(e==1)
                                 f*=1;
                             else
                                 f*=0;
                         else
                             if(e!=1)
                                 f*=1;
                             else
                                 f*=0;
                         if(b==1)
                             f*=0;
                         if(c<3)
                             if(a==5)
                                 f*=1;
                             else
                                 f*=0;
                          else
                              if(a!=5)
                                 f*=1;
                              else
                                 f*=0;
                          if(d==2)
                              if(c!=1)
                                 f*=1;
                              else
                                 f*=0;
                          else
                              if(c==1)
                                 f*=1;
                              else
                                 f*=0;
                          if(d==1)
                              f*=0;
                          if(f==1)
                               cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
                      }
     return 0;
}
//??????? ?????????????? 


struct work
{
    int r;
    int h;
};

struct work i, j, k, l, m;

int main()
{   
    
    
    int sum;
    

    for (i.r=1; i.r<6; ++i.r)
        for (j.r=1; j.r<6; ++j.r) {
            if (i.r==j.r) continue;
            for (k.r=1; k.r<6; ++k.r) {
                if (k.r==i.r || k.r==j.r) continue;
                for (l.r=1; l.r<6; ++l.r) {
                    if (l.r==i.r || l.r==j.r || l.r==k.r) continue;
                    for (m.r=1; m.r<6; ++m.r) {
                        if (m.r==i.r||m.r==j.r||m.r==k.r||m.r==l.r||m.r==2||m.r==3) continue;
                        sum = 0;
                        i.h = (m.r == 1);
                        j.h = (j.r == 2);
                        k.h = (i.r == 5);
                        l.h = (k.r != 1);
                        m.h = (l.r == 1);
                        if ((i.r<3 && i.h) || (i.r>2 && (!i.h)))
                        if ((j.r<3 && j.h) || (j.r>2 && (!j.h)))
                        if ((k.r<3 && k.h) || (k.r>2 && (!k.h)))
                        if ((l.r<3 && l.h) || (l.r>2 && (!l.h)))
                        if ((m.r<3 && m.h) || (m.r>2 && (!m.h)))                                                                                                
                           printf("%d %d %d %d %d", i.r, j.r, k.r, l.r, m.r);
                        
                    }
                }
            }
        }
}
int main ()
{
	int a, b, c, d, e, A, B, C, D, E, cnt;
	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 && e != 2 && e != 3)
						{
							cnt = 0;
							if (A == 1 && (a == 1 || a == 2))
							{
								cnt ++;
							}
							if (B == 1 && (b == 1 || b == 2))
							{
								cnt ++;
							}
							if (C == 1 && (c == 1 || c == 2))
							{
								cnt ++;
							}
							if (D == 1 && (d == 1 || d == 2))
							{
								cnt ++;
							}
							if (E == 1 && (e == 1 || e == 2))
							{
								cnt ++;
							}
							if (cnt == 2 && a * a + b * b + c * c + d *d + e * e == 55)
							{
								cout << a << " " << b << " " << c << " " << d << " " << e << endl;
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int A, B, C, D, E;
    int a, b, c, d, e;
    for (E = 1; E <= 5; E++)
    {
        if (E == 2 || E == 3)
        continue;
         for (B = 1; B <= 5; B++)
         {
              for (C = 1; C <= 5; C++)
              {
                   for (D = 1; D <= 5; D++)
                   {
                        for (A = 1; A <= 5; A++)
                        {
                            if (A * B * C * D * E!=120)
                              continue;
                            a = (E == 1);
                            b = (B == 2);
                            c = (A == 5);
                            d = (C != 1);
                            e = (D == 1);
                            if (a)
                            {
                                  if (A != 1 && A != 2)
                                  continue;
                            }
                            if(!a)
                            {
                                 if (A == 1 || A == 2)
                                 continue;
                            }
                            if (b)
                            {
                                  if (B != 1 && B != 2)
                                   continue;
                            }
                            if (!b)
                            {
                                 if ( B == 1 || B == 2)
                                 continue;
                            }
                             if (c)
                            {
                                  if (C != 1 && C != 2)
                                   continue;
                            }
                         if(!c)
                            {
                                 if (C == 1 || C == 2)
                                 continue;
                            }
                            if (d)
                            {
                                  if (D != 1 && D != 2)
                                   continue;
                            }
                           if(!d)
                            {
                                 if (D == 1 || D == 2)
                                 continue;
                            }
                            if (e)
                            {
                                  if (E != 1 && E != 2)
                                   continue;
                            }
                            if(!e)
                            {
                                 if (E == 1 || E == 2)
                                 continue;
                            }
                            cout << A << ' ' << B << ' ' << C << ' ' << D << ' ' << E;
                        }
                   }
              }
         }
    }

    return 0;    
}
int main()
{
	int A,B,C,D,E,a,b,c,d,e,i=1,j=1,f=0;
	A=(e==1);
	B=(b==2);
	C=(a==5);
	D=(c!=1);
	E=(d==1);
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			c=i;
			d=j;
			if(i==j) continue;
			if((c==1)||(c==2))
			{
				a=5;
				e=4;
			}
			if((e==1)||(e==2))
			{
				d=1;
			}
			if((a==1)||(a==2))
			{
				e=1;
			}
			b=2;
			if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e)
			{
				cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
				f++;
			}
			if(f!=0) break;
		}
		if(f!=0) break;
	}
	return 0;
}
int main()
{
	int sum=0,t[5];
for(int a=1;a<=5;a++)
{
	t[0]=a;
	for(int b=1;b<=5;b++)
	{
		t[1]=b;
		if(a==b)
			continue;
		for(int c=1;c<=5;c++)
		{
			t[2]=c;
			if(c==b || c==a)
				continue;
			for(int d=1;d<=5;d++)
			{
				t[3]=d;
				if(d==a || d==b || d==c)
					continue;
				int e=15-a-b-c-d;
				t[4]=e;
				if(e !=2 && e !=3)
				{
					int h[5];
					h[0]=(e==1);
					h[1]=(b==2);
					h[2]=(a==5);
					h[3]=(c>1);
					h[4]=(d==1);
					if((e==1)+(b==2)+(a==5)+(c>1)+(d==1)==2)
					{
						sum=0;
						for(int i=0;i<=4;i++)
						{
							
							if(h[i]==1 &&( t[i]==1 || t[i]==2))
							{
								sum=sum+1;
							}
						}
						if(sum==2)
						{
							for(int i=0;i<=3;i++)
							{
								cout<<t[i]<<" ";
							}
							cout<<t[4];
						}
					}
				}
			}
		}
	}
}
return 0;
}
int main()
{
	int a,b,c,d,e,word[6],rank[6];
	for(a=1;a<6;a++)
		for(b=1;b<6;b++)
			if(a!=b)
		for(c=1;c<6;c++)
			if(c!=a&&c!=b)
		for(d=1;d<6;d++)
			if(d!=a&&d!=b&&d!=c)
		for(e=1;e<6;e++)
			if(e!=a&&e!=b&&e!=c&&e!=d)
			{	word[1]=(e==1);
		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&&(e!=2&&e!=3))
			cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
			}
	return 0;
}
int main()
{
	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++)
					{
						if((e!=2) && (e!=3))
						{
							t=0;
							if ((a<=2 && e==1)||(a>=3&&e!=1))
								t++;
							if (b!=1)
								t++;
							if ((c<=2 && a==5) || (c>=3 && a!=5))
								t++;
							if ((d<=2 && c!=1)||(d>=3&&c==1))
								t++;
							if (e!=1 && d!=1)
								t++;
							if ((t==5)&&(a+b+c+d+e==15)&&(a*b*c*d*e==120))
							{
								cout <<a<<" " <<b<<" "<<c<<" "<<d<<" "<<e<<endl;
								break;
							}
						}
					}
				}
			}
		}
	}
	cin.get();
	return 0;
}
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!=1)
                        {
                            if(b==2)
                            {
                                if(a==5)
                                {
                                    if(d!=4&&d!=1)
                                    {
                                        if(e!=1)
                                        {
                                            if(c==1)
                                            {
                                             if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e)
                                            {
                                                printf("%d %d %d %d %d\n",a,b,c,d,e);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

}
/*
 * middle_2.cpp
 *??
??????????5???????????????????????5??????????E????????2???3??
A???????E???????
B?????????????????
C???????A????????
D???????C?????????
E???????D??????????
????????????????????????????????????A?B?C?D?E??????
????
??
????
???????????A?B?C?D?E???????????????????
????
????
1 2 3 4 5
 *
 *  Created on: 2013-11-8
 *      Author: b
 */
int main ()
{
	int a,b,c,d,e;             //abcde???????????
	int wa,wb,wc,wd,we;
	for (a=1;a<=5;++a)         //??abcde???
	{
		for (b=1;b<=5;++b)
		{
			if (a==b) continue;
			for (c=1;c<=5;++c)
			{
				if (a==b||a==c||b==c) continue;
				for (d=1;d<=5;++d)
				{
					if (a==b||a==c||a==d||b==c||b==d||c==d) continue;
					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;    //e???????
						wa= (a==1||a==2) + (e==1);   //????????????????????????????????????????????????
						wb= (b==1||b==2) + (b==2);
						wc= (c==1||c==2) + (a==5);
						wd= (d==1||d==2) + (c!=1);
						we= (e==1||e==2) + (d==1);
						if ((wa==0||wa==2)&&(wb==0||wb==2)&&(wc==0||wc==2)&&(wd==0||wd==2)&&(we==0||we==2))
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a=0,b=0,c=0,d=0,e=0;
	int word[6]={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;
						e=15-a-b-c-d;
						if(e==2||e==3)continue;         //e??23?
						word[a]=(e==1);
						word[b]=(b==2);
						word[c]=(a==5);
						word[d]=(c!=1);
						word[e]=(d==1);
						if((word[1]+word[2]==2)&&(word[3]+word[4]+word[5]==0))//????
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
					}
				}
		}
	}
      return 0;
}
int main()
{
	int a,b,c,d,e;  //??
	int wordsright[6];   //???????????
	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=1;e<6;e++)
					{
						if((e==2)||(e==3)) continue;
						if((e==a)||(e==b)||(e==c)||(e==d))
							continue;
						wordsright[a]=(e==1);
						wordsright[b]=(b==2);
						wordsright[c]=(a==5);
						wordsright[d]=(c!=1);
						wordsright[e]=(d==1);
						if((wordsright[1]==1)&&(wordsright[2]==1))
						{
							if((wordsright[3]==0)&&(wordsright[4]==0)&&(wordsright[5]==0))
							{
								goto m;
							}
						}
					}
				}
			}
		}
	}
	m:
	printf("%d %d %d %d %d",a,b,c,d,e);
	return 0;
}
/*
 * 4.cpp
 *
 *  Created on: 2012-11-9
 *      Author: AK
 */
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(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||e==2||e==3) continue;
					    if(a<=2&&e!=1)	continue;
					    if(a>2&&e==1)	continue;
					    if(b<=2&&b!=2)	continue;
					    if(b>2&&b==2)	continue;
					    if(c<=2&&a!=5)  continue;
					    if(c>2&&a==5)  continue;
					    if(d<=2&&c==1) continue;
					    if(d>2&&c!=1)   continue;
					    if(e<=2&&d!=1)  continue;
					    if(e>2&&d==1)  continue;
					    cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
					}
				}
			}
		}
	return 0;
}
int main()
{
	int a[5],b[5],c[5];
	int i,sum,sum1;
	for(a[0]=1;a[0]<6;a[0]=a[0]+1)
	{
		for(a[1]=1;a[1]<6;a[1]=a[1]+1)
		{
			if(a[0]!=a[1])
			{
				for(a[2]=1;a[2]<6;a[2]=a[2]+1)
				{
					if(a[0]!=a[2]&&a[1]!=a[2])
					{
						for(a[3]=1;a[3]<6;a[3]=a[3]+1)
						{
							if(a[3]!=a[0]&&a[3]!=a[1]&&a[3]!=a[2])
							{
								for(a[4]=1;a[4]<6;a[4]=a[4]+1)
								{
									if(a[4]!=a[0]&&a[4]!=a[1]&&a[4]!=a[2]&&a[4]!=a[3]&&a[4]!=2&&a[4]!=3)
									{
										sum=0;
										sum1=0;
										b[0]=(a[4]==1);
										b[1]=(a[1]==2);
										b[2]=(a[0]==5);
										b[3]=(a[2]!=1);
										b[4]=(a[3]==1);
										for(i=0;i<5;i=i+1)
										{
											if(a[i]==1)
												sum=sum+b[i];
											if(a[i]==2)
												sum=sum+b[i];
											if(a[i]!=1&&a[i]!=2)
												sum1=sum1+b[i];
										}
										if(sum==2&&sum1==0)
										{
											for(i=0;i<5;i=i+1)
												c[i]=a[i];
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	for(i=0;i<5;i=i+1)
		if(i!=4)
		cout<<c[i]<<' ';
		else
			cout<<c[i];
	return 0;
}
int main()
{
	int a[6],b[6],i;
	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]++)
		   {
		     for(i=1;i<=5;i++)
			 {
				 b[i]=(a[i]==1||a[i]==2);
			   }
			 if(a[5]!=2&&a[5]!=3) 
			 {
			 if(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]) 
			 {
			 
			   if((b[1]-(a[5]==1))==0&&(b[2]-(a[2]==2))==0&&(b[3]-(a[1]==5))==0&&(b[4]-(a[3]!=1))==0&&(b[5]-(a[4]==1))==0)
				   cout<<a[1]<<' '<<a[2]<<' '<<a[3]<<' '<<a[4]<<' '<<a[5]<<endl;
			 
			 
		   
			 }}}}}  
	  }

	 
	}
	
	return 0;
}
int main()
{
	int a,b,c,d,e;
	int x[6];
	for(e=1;e<=5;e++)
	{
		if(e==2||e==3) continue;
		else
		{
			for(a=1;a<=5;a++)
			{
				if(e==a) 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;
									x[a]=(e==1);
									x[b]=(b==2);
									x[c]=(a==5);
									x[d]=(c!=1);
									x[e]=(d==1);
									if(x[1]+x[2]==2&&x[3]+x[4]+x[5]==0)
										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++)
			for (c=1;c<=5;c++)
				for (d=1;d<=5;d++)
					for (e=1;e<=5;e++)
						 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))==5)&&(a!=b)&&(a!=c)&&(a!=d)&&(a!=e)&&(b!=c)&&(b!=d)&&(b!=e)&&(c!=d)&&(c!=e)&&(d!=e)&&(e!=2)&&(e!=3))
							{cout << a <<" ";
						     cout << b <<" ";            //???????
						     cout << c <<" ";
						     cout << d <<" ";
						     cout << e <<endl;}
	return 0;
}
//============================================================================
// Name        : 131108middleExam.cpp
// Author      : 1300012854 xyz
// Version     : MiddleExam Good Luck
// Copyright   :
// Description : Hello World in C++, Ansi-style
//============================================================================
//I believe I can!!Relax!!!

int main() {
	int a,b,c,d,e;//????a-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;//???????a-d?????????
		e=15-a-b-c-d;//??????a-e??15?????????????????????e
		if(e==2 || e==3)
			continue;//????e??23?
		if((e==1)+(a==1||a==2)!=1)//????????????????????????????????????????????1
		if((b==2)+(b==1||b==2)!=1)
		if((a==5)+(c==1||c==2)!=1)
		if((c!=1)+(d==1||d==2)!=1)
		if((d==1)+(e==1||e==2)!=1)
		{
			cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;//???????????????????
			return 0;
		}
	}
	}
	}
	return 0;
}
int main()
{
	int a,b,c,d,e,a1,b1,c1,d1,e1;
	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)
			{
				continue;
			}
			else
			{
				a1=((a==1||a==2)+(e==1));
				b1=((b==1||b==2)+(b==2));
				c1=((c==1||c==2)+(a==5));
				d1=((d==1||d==2)+(c!=1));
				e1=((e==1||e==2)+(d==1));
				if (a1==1||b1==1||c1==1||d1==1||e1==1)
				{
					continue;
				}
				else
				{
					cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
				}
			}
			}
			}
			}
		}
	}






}
int main()
{
	//int a[2], b[2], c[2], d[2], e[2];
	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 && ((e == 1 && d == 1 && c != 1) + (b == 2) + 
								(a  == 5 && e != 1) + (c != 1) + ( d == 1 && c != 1) == 2)
								&& (a == 5) && (c == 1) && (a + b + c + d + e) == 15 && a*b*c*d*e == 120)
							cout << a <<" " << b << " "<< c <<" "<< d <<" "<< e << 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++)
				{
					E=15-A-B-C-D;
					if(E!=2&&E!=3&&A!=B&&A!=C&&A!=D&&A!=E&&C!=B&&D!=B&&E!=B&&C!=D&&C!=E&&D!=E)
					{
						if(A==2&&E!=1)
							continue;
						if(C==1||C==2)
							if(A!=5)
								continue;
						if(D==1||D==2)
							if(C==1)
								continue;
						if(E==1||E==2)
							if(D!=1)
								continue;
						if(A==1)
							continue;
						if(B==1&&B!=2)
							continue;


						if(((E==1)+(B==2)+(A==5)+(C!=1)+(D==1))==2)
						{
							cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E<<endl;
					}	}


				}


	return 0;
}
int main()
{   
	int s[6];
	int p[6];
	int i,j;
	int l,m;
	int flag=0;
    
	
    for(p[1]=1;p[1]<=5;p[1]++)
			for(p[2]=1;p[2]<=5;p[2]++)
				for(p[3]=1;p[3]<=5;p[3]++)
					for(p[4]=1;p[4]<=5;p[4]++)
                         for(p[5]=1;p[5]<=5;p[5]++)
					     {   
						   if((p[5]!=2)&&(p[5]!=3))
						    { 
								flag=0;
						      for(l=1;l<5;l++)
						     {
							    for(m=l+1;m<=5;m++)
							  {    
								   if(p[l]==p[m])
								   {
									   flag=1;
									   break;
						           }
							  }
								if(flag==1)
									break;
						     }
						       if(flag==1)
									continue;
								for(i=1;i<=5;i++)
							        for(j=1;j<=5;j++)
								        if(j!=i)
								          {
									         if((p[i]==1)&&(p[j]==2))
											 {s[1]=(p[5]==1);
	                                         s[2]=(p[2]==2);
	                                         s[3]=(p[1]==5);
	                                         s[4]=(p[3]!=1);
											 s[5]=(p[4]==1);
											 if((s[i]==1)&&(s[j]==1)&&(s[1]+s[2]+s[3]+s[4]+s[5]==2))
										         cout<<p[1]<<' '<<p[2]<<' '<<p[3]<<' '<<p[4]<<' '<<p[5]<<endl;}
									        
											
										   }
						}
					}




	
	return 0;
}