semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a,b,c;
	int Aa,Bb,Cc;
	for(a=1;a<4;a++)
		for(b=1;b<4;b++)
			for(c=1;c<4;c++)
			{
				Aa=(b>a)+(c==a);
							            Bb=(a>b)+(a>c);
							            Cc=(c>b)+(b>a);
							            if (a+Aa==3)
							            	            	if(b+Bb==3)
							            	            		if(c+Cc==3)

	            	if(a>b&&b>c)
	            		cout<<"CBA";
	            	else
	            if(a>c&&c>b)
	            	            		cout<<"BCA";
	            else
	            if(b>a&&a>c)
	            	            		cout<<"CAB";
	            else
	            if(b>c&&c>a)
	            	            		cout<<"ACB";
	            else
	            if(c>b&&b>a)
	            	            		cout<<"ABC";
	            else
	            if(c>a&&a>b)
	            	            		cout<<"BAC";
			}


return 0;
}
//??????   ???   1000012729
int main()
{
	int a,b,c,i;                                      //??a,b,c?A,B,C??????
	char eat[3];                                      //?????????????
	int ansa=0,ansb=0,ansc=0;                         //????????
	for(a=0;a<3;a++)
	{
		for(b=0;b<3;b++)
		{
			for(c=0;c<3;c++)
			{
				ansa=(b<a)+(c==a);                    //A??
				ansb=(a<b)+(a<c);                     //B??
				ansc=(c<b)+(b<a);                     //C??
				if(ansa==a && ansb==b && ansc==c)     //????????????????????
				{
					eat[a]='A';                       //???????????????
					eat[b]='B';
					eat[c]='C';
				}
			}
		}
	}
	for(i=2;i>=0;i--)                                  //??????????????
		cout<<eat[i];                            //???????????????????????????????
		cout<<endl;
		return 0;
}
int main()
{
	int a, b, c, A, B, C, i;
	for (a = 0; a <= 2; a ++)
		for (b = 0; b <= 2; b ++)
			for (c = 0; c <=2; c ++)
			{
				A = (b > a) + (a == c) + a;
				B = (a > b) + (a > c) + b;
				C = (c > b) + (b > a) + c;
				if (A == B && B == C)
				{
					for (i = 0; i <= 2; i ++)
					{
						if (a == i) cout << 'A';
						if (b == i) cout << 'B';
						if (c == i) cout << 'C';
					}
					cout << endl;
				}
			}
}
main()
{
    int a,b,c,a1,b1,c1;
    for(a=0;a<3;a++)
    {
        for(b=0;b<3;b++)
        {
            for(c=0;c<3;c++)
            {
                a1=0;
                b1=0;
                c1=0;
                if(b>a)
                a1++;
                if(c==a)
                a1++;
                if(a>b)
                b1++;
                if(a>c)
                b1++;
                if(c>b)
                c1++;
                if(b>a)
                c1++;
                if(a1+a==b1+b&&b1+b==c1+c)
                {
                printf("BCA");
                }
            }
        }
    }
}
//**************************************
//* ??????                       *
//* ?????                         *
//* ???11?12?                     *
//* ?????????                 *
//**************************************
int main()
{
	int words[4],rank[4];                             //words????????rank????
	int A,B,C;
	for(A=1;A<4;A++)
	{
		for(B=1;B<4;B++)
		{
			if(B==A) continue;
			C=6-A-B;                                  //??????
				words[1]=(B>A)+(A==C);
				words[2]=(A>B)+(A>C);
				words[3]=(C>B)+(B>A);
					rank[A]=1;
					rank[B]=2;
					rank[C]=3;
						if(words[rank[1]]>words[rank[2]]&&words[rank[2]]>words[rank[3]])    //????????
					            {
							for(int i=1;i<4;i++)                      //??????
							{
								cout<<(char)(rank[i]+64);
							}
						}
		}
	}
	return 0;
}
/*
 * compare2.cpp
 *
 *  Created on: 2012-10-28
 *      Author: Administrator
 */
int main ()
{
	int a,b,c;
	int sum1 = 0 , sum2 = 0 , sum3 = 0 ;
	a = 1 ; b = 2 ; c = 3 ;
	sum1 = (b > a)+(a == c)+ a ;
    sum2 = (a > b)+(a > c)+ b ;
	sum3 = (c > b)+(b > a)+ c ;
	if(sum1 == 3 && sum2 == 3 && sum3 == 3)
    {
		cout <<"A"<<"B"<<"C";
	}
	else
	    a = 1 ; b = 3 ; c = 2 ;
	    sum1 = (b > a)+(a == c)+ a ;
	    sum2 = (a > b)+(a > c)+ b ;
		sum3 = (c > b)+(b > a)+ c ;
		if(sum1 == 3 && sum2 == 3 && sum3 == 3)
	    {
			cout<<"A"<<"C"<<"B";
		}
		else a = 2 ; b = 1 ; c = 3 ;
		sum1 = (b > a)+(a == c)+ a ;
	    sum2 = (a > b)+(a > c)+ b ;
	    sum3 = (c > b)+(b > a)+ c ;
	    if(sum1 == 3 && sum2 == 3 && sum3 == 3)
	    {
	    	cout<<"B"<<"A"<<"C";
	    }
	    else a = 2 ; b = 3 ; c = 1 ;
	    sum1 = (b > a)+(a == c)+ a ;
	    sum2 = (a > b)+(a > c)+ b ;
	    sum3 = (c > b)+(b > a)+ c ;
	    if(sum1 == 3 &&  sum2 == 3 && sum3 == 3)
	    {
	    	cout<<"C"<<"A"<<"B";
	    }
	    else a = 3 ; b = 2 ; c = 1 ;
	    sum1 = (b > a)+(a == c)+ a ;
	    sum2 = (a > b)+(a > c)+ b ;
 		sum3 = (c > b)+(b > a)+ c ;
 		if(sum1 == 3 &&  sum2 == 3 &&  sum3 == 3)
 		{
 			cout<<"C"<<"B"<<"A";
 		}
 		else
 		{
 			a = 3 ; b = 1 ;c = 2 ;
 		   sum1 = (b > a)+(a == c)+ a ;
 	       sum2 = (a > b)+(a > c)+ b ;
 		   sum3 = (c > b)+(b > a)+ c ;
 		  if(sum1 == 3 &&  sum2 == 3 && sum3 == 3)
 		  {
 			cout<<"B"<<"C"<<"A";
 		  }
 		}
	   return 0 ;
}
int main()
{
    int A,B,C,shumu[4],i;
    char pai[4];
    for(i=1;i<=3;i++)shumu[i]=0;
    for(A=1;A<=3;A++) 
    {
                      for(B=1;B<=3;B++)
                      {
                                       if(A==B)continue;
                                       C=6-A-B;
                                       shumu[1]=(B>A)+(A==C);//A??????? 
                                       shumu[2]=(A>B)+(A>C);//B??????? 
                                       shumu[3]=(C>B)+(B>A);//C??????? 
                                                        if((shumu[1]+A)==(shumu[2]+B) && (shumu[2]+B)==(shumu[3]+C))//????????????????????????? 
                                                        {
                                                                                      pai[A]='A';
                                                                                      pai[B]='B';
                                                                                      pai[C]='C';
                                                        }
                      }
    }
    for(i=1;i<=3;i++)cout<<pai[i];
    cin.get();cin.get();cin.get();cin.get();cin.get();cin.get();
    return 0;
}
int main()
{
    int A,B,C;
    for(A=0;A<=2;A++)
    for(B=0;B<=2;B++)
    for(C=0;C<=2;C++)
    if(((B>A)+(A==C)==(2-A))&&((A>B)+(A>C)==(2-B))&&((C>B)+(B>A)==(2-C))&&(A!=B)&&(A!=C)&&(B!=C))
    {if(A>B>C)
    cout<<"C"<<"B"<<"A"<<endl;
    if(A>C>B)
    cout<<"B"<<"C"<<"A"<<endl;
    if(B>A>C)
    cout<<"C"<<"A"<<"B"<<endl;
    if(B>C>A)
    cout<<"A"<<"C"<<"B"<<endl;
    if(C>B>A)
    cout<<"A"<<"B"<<"C"<<endl;
    if(C>A>B)
    cout<<"B"<<"A"<<"C"<<endl;
    }
   
    return 0;}
main()
{
	int a,b,c,i=0,j=0,k=0,w,x,y,z;
	char p='A',q='B',r='C',t;
	for(a=0;a<3;a++)
		for(b=0;b<3;b++)
			for(c=0;c<3;c++)
			{
				if(b>a) i++;if(a==c) i++;
				if(a>b) j++;if(a>c) j++;
				if(c>b) k++;if(b>a) k++;
				if(a+i==2&&b+j==2&&c+k==2)
				{
					w=a;x=b;y=c;
				}
				i=0;j=0;k=0;
			}
	if(w<x)
	{
		z=w;w=x;x=z;t=p;p=q;q=t;
	}
	if(w<y)
	{
		z=w;w=y;y=z;t=p;p=r;r=t;
	}
	if(x<y)
	{
		z=x;x=y;y=z;t=q;q=r;r=t;
	}
	printf("%c%c%c",r,q,p);
}
//****************************************************** 
/* ? ? ?   ????
/* ? ?      ????                           
/* ? ? ? ??2010 ? 11  ?  17  ?     
/* ? ? ? ???????
/* ? ?      ?1000012752        
*******************************************************/
int main()
{
	char name[4]={'0'};																		//???????????????????
	int a,b,c;																				//abc???
	int i;
	int ta,tb,tc;																			//abc???
	for(a=1 ; a<=3 ; a++)																	//?abc??????????3?????123
	{
		for(b=1 ; b<=3 ; b++)
		{
			for(c=1 ; c<=3 ; c++)
			{
				ta = (b>a) + (c==a);														//??????
				tb = (a>b) + (a>c);															//????????????
				tc = (c>b) + (b>a);
                
                if(  
					 ( ((a<b)&&(ta>tb)) + ((a==b)&&(ta==tb)) + ((a>b)&&(ta<tb)) == 1  )		//????a?b???????a???b????????		
				   &&( ((b<c)&&(tb>tc)) + ((b==c)&&(tb==tc)) + ((b>c)&&(tb<tc)) == 1  )		//????b?c???????b???c????????
				   &&( ((c<a)&&(tc>ta)) + ((c==a)&&(tc==ta)) + ((c>a)&&(tc<ta)) == 1  )	  )	//????c?a???????c???a????????
			
				{																			//??????????abc????
                     name[a] = 'A';															//???????????
					 name[b] = 'B';
					 name[c] = 'C';
				}
			}
		}
	}
	for(i=1 ; i<=3 ; i++)
		cout << name[i];


    return 0;
}
int main()
{   int i,j,k;
    for (i=0; i<3; i++) {
        for (j=0; j<3; j++) {
            for (k=0; k<3; k++) {
                if ((i-j)*(j-k)*(k-i)==0) {
                    continue;
                }
                else {
                    int x[3];
                    char c[3];
                    c[0]='A';
                    c[1]='B';
                    c[2]='C';
                    x[0]=2-((j>i)+(k==i));
                    x[1]=2-((i>j)+(i>k));
                    x[2]=2-((k>j)+(j>i));
                    if (x[0]==i && x[1]==j && x[2]==k) {
                                                for (int q=0; q<3; q++) {
                            if (x[q]==0) {
                            cout<<c[q];
                            }
                        }
                        
                        for (int q=0; q<3; q++) {
                            if (x[q]==1) {
                                cout<<c[q];
                            }
                        }
                        
                        for (int q=0; q<3; q++) {
                            if (x[q]==2) {
                                cout<<c[q];
                            }
                        }
                        
                    }
                }
                
            }
        }
    }
    return 0;
}
int main()
{
    int a, b, c;
    int A, B, C;
    for(a = 1; a <= 3; a++)                        //A??? 
    {
          for(b = 1; b <= 3; b++)                  //B??? 
          {
                for(c = 1; c <= 3; c++)            //C??? 
                {
                      if(a != b || a != c || b != c)
                      {
                           A = (b > a) + (c == a);                    //ABC???? 
                           B = (a > b) + (a > c);
                           C = (c > b) + (b > a);
                           if(A == 2 && a == 1 && B == 1 && b ==2 && C ==0 && c == 3)
                                  cout << "A" << "B" << "C" << endl;
                           if( A == 2 && a == 1 && B == 0 && b == 3 && C == 1 && c == 2)
                                  cout << "A" << "C" << "B" << endl;
                           if( A == 1 && a == 2 && B == 0 && b == 3 && C == 2 && c == 1)
                                  cout << "C" << "A" << "B" << endl;
                           if( A == 1 && a == 2 && B == 2 && b == 1 && C == 0 && c == 3)
                                  cout << "B" << "A" << "C" << endl;
                           if( A == 0 && a == 3 && B == 1 && b == 2 && C == 2 && c == 1)
                                  cout << "C" << "B" << "A" <<endl;
                           if( A == 0 && a == 3 && B == 2 && b == 1 && C == 1 && c == 2)
                                  cout << "B" << "C" << "A" << endl;
                      }
                }
          }
    }
    return 0;
}
/*???3??????????????
 * A??B??????C???????;B??A??????A??C???;C????B????B?A????
 * ????????????????????????????????3??????
 *????: 2012-10-17
 *??: ??
 */

int main()
{	if((((2 > 3) + (1 == 3)) == 0) && (((3 > 2) + (3 > 1)) == 3) && (((1 > 2) + (2 > 3)) == 2))
		cout << "CBA";   //?????????
	else if((((1 > 3) + (2 == 1)) == 0) && (((3 > 1) + (3 > 2)) == 2) && (((2 > 1) + (1 > 3)) == 1))
		cout << "BCA";
	else if((((3 > 2) + (3 == 2)) == 1) && (((2 > 3) + (2 > 1)) == 0) && (((1 > 3) + (3 > 2)) == 2))
		cout << "CAB";
	else if((((3 > 1) + (2 == 3)) == 2) && (((1 > 3) + (1 > 2)) == 0) && (((2 > 3) + (3 > 1)) == 1))
		cout << "ACB";
	else if((((1 > 2) + (3 == 2)) == 1) && (((2 > 1) + (2 > 3)) == 2) && (((3 > 1) + (1 > 2)) == 0))
		cout << "BAC";
	else
		cout << "ABC";
	return 0;
}
/*
 * practice.cpp
 *
 *  Created on: 2013-12-26
 *      Author: 111
 */

int main()
{
	int a,b,c,isa,isb,isc;
	for (a=1;a<=3;a++)
		for (b=1;b<=3;b++)
			for (c=1;c<=3;c++)
			{
				isa = (b>a) + (c==a);
				isb = (a>b) + (a>c);
				isc = (c>b) + (b>a);
				if ((a+isa==b+isb)&&(b+isb==c+isc))
				{
				    if(isa<isb&&isb<isc)  cout << "CBA";
				    if(isa<isc&&isc<isb)  cout << "BCA";
				    if(isb<isa&&isa<isc)  cout << "CAB";
				    if(isb<isc&&isc<isa)  cout << "ACB";
				    if(isc<isa&&isa<isb)  cout << "BAC";
				    if(isc<isb&&isb<isa)  cout << "ABC";
				}
			}
	return 0;
}
int main(){
 int A,B,C;
 int a,b,c;
 for(A=1;A<=3;A++)
  for(B=1;B<4;B++)
   for(C=1;C<4;C++){
     a=((B>A)+(C==A));
     b=((A>B)+(A>C));
     c=((C>B)+(B>A));
     if(((A>B&&a<b)||(A==B&&a==b)||(A<B&&a>b))
       +((A>C&&a<c)||(A==C&&a==c)||(A<C&&a>c))
       +((B<C&&b>c)||(B>C&&b<c)||(B==C&&b==c))==3){
      if(A==1)
        {if(B==2) cout<<"ABC"<<endl;
        else cout<<"ACB"<<endl;}
      if(A==2) {
  if (B==1) cout<<"BAC"<<endl;
   else cout<<"CAB"<<endl;}
      if(A==3){if (B==1) cout<<"BCA"<<endl;
               else cout<<"BAC"<<endl;}

  }
}
return 0;
}
int main()
{int a,b,c;
 for(a=0;a<3;a++) 
  for(b=0;b<3;b++)
   for(c=0;c<3;c++) //a,b,c???????0,1,2 
    if((a==2-(b>a)-(a==c))&&(b==2-(a>b)-(a>c))&&(c==2-(c>b)-(b>a))) //??????????
                                                     //????2??????? 
       if(a>b&&b>c) cout<<"CBA";
       else if(a>c&&c>b) cout<<"BCA";
       else if(b>c&&c>a) cout<<"ACB";
       else if(b>a&&a>c) cout<<"CAB";
       else if(c>a&&a>b) cout<<"BAC";
       else if(c>b&&b>a) cout<<"ABC";  //?????????? 
 return 0;
}
int main()
{
	int A, B, C, a, b, c;
	for(A = 0; A < 3; A ++)
	{
		for(B = 0; B < 3; B ++ )
		{
			if( B == A) continue;
			C = 3 - A - B;
		
	
		a = (B > A) + (C == A);
		b = (A > B) + (A > C);
		c = (C > B) + (B > A);
		if((A + a) == 2 && (B + b) == 2 && (C + c) == 2)
		{
			if(A > B && B > C)
				cout << "CAB" << endl;
			if(B > A && A > C)
				cout << "CAB" << endl;
			if(C > A && A > B)
				cout << "BAC" << endl;	
			if(A > C && C > B)
				cout << "BCA" << endl;
			if(B > C && C > A)
				cout << "ACB" << endl;
			if(C > B && B > A)
				cout << "ABC" << endl;
		}
		}
	}
		return 0;
}
//
//	????:	???
//	????:	????????3?????
//	????:	?  ? ( ? ? : 1000012733 ) 
//	????:	2010 ? 11 ? 20 ?
//
int main()
{
	int a, b, c, i, j, k, sum1, sum2, sum3;		//????????????????a?b?c???????????sum1?sum2?sum3???????????????????????
	for ( i = 1; i <= 3; i ++ )
	{
		a = i;
		for ( j = 1; j <= 3; j ++ )
		{
			b = j;
			if ( b != a )	//b????a??????
				for ( k = 1; k <= 3; k ++ )
				{
					c = k;
					if (( c != a ) && ( c != b ))	//c????a?b??????
					{
						sum1 = a + ( b > a ) + ( c == a );		
						sum2 = b + ( a > b ) + ( a > c );
						sum3 = c + ( c > b ) + ( b > a );	//??????????????????
						if (( sum1 == 3 ) && ( sum2 == 3 ) && ( sum3 == 3 ))	//????????????????????
						{
							if (( a < b ) && ( b < c ))
								cout << "ABC";
							if (( a < c ) && ( c < b ))
								cout << "ACB"; 
							if (( b < a ) && ( a < c ))
								cout << "BAC";
							if (( b < c ) && ( c < a ))
								cout << "BCA";
							if (( c < a ) && ( a < b ))
								cout << "CAB";
							if (( c < b ) && ( b < a ))
								cout << "CBA";		//?????????????????
						}
					}
				}
		}
	}
	return 0;
}
int main()
{
	int A=0,B=0,C=0,a=0,b=0,c=0,i=0;
	char rank[3];
	for(A=0;A<3;A++)
	{
		for(B=0;B<3;B++)
		{
			if(A==B)continue;
				C=3-A-B;
				a=(B>A)+(C==A);
				b=(A>B)+(A>C);
				c=(C>B)+(B>A);
			if((A+a==2)&&(B+b==2)&&(C+c==2))
			{
				rank[A]='A';
				rank[B]='B';
				rank[C]='C';
			}
		}

	}
	for(i=0;i<3;i++)
	{
		cout<<rank[i];
	}
	cout<<endl;
	return 0;
}
int main()
{
    int a , b , c ;
    int words[4];
    for( a = 1 ; a <= 3 ; a ++ )                                        //???A?B?C????????1?2?3??? 
         for( b = 1 ; b <= 3 ; b ++ )
         {
              if( b != a )
              {
                  c = 6 - a - b ;                                       //c???a?b???????????6 
                  words[a] = ( b > a ) + ( c == a ) ;
                  words[b] = ( a > b ) + ( a > c ) ;
                  words[c] = ( c > b ) + ( b > a ) ;
                  
                  if( words[1] > words[2] && words[2] > words[3] )      //?????????????a?b?c????????????? 
                  {
                      char person[4] ;
                      person[0] = 0 ;
                      person[a] = 'A' ;                                 //????????????? 
                      person[b] = 'B' ;
                      person[c] = 'C' ;
                      cout << person[1] << person[2] << person[3] ;
                      break ;
                  }
              }    
         }      
return 0 ;
}
int main()                //???
{
	int A,B,C,i=0,n[4];
	char m[4];                   //????
	for(A=1;A<4;A++)
	{
		for(B=1;B<4;B++)
		{
			if(A==B)continue;
			C=6-A-B;
			m[A]='A';
			m[B]='B';
			m[C]='C';
			n[A]=(B>A)+(C==A);
	        n[B]=(A>B)+(A>C);
	        n[C]=(C>B)+(B>A);
			if(((n[A]>n[B]&&B>A)||(n[B]>n[A]&&B<A))+((n[A]>n[C]&&C>A)||(n[C]>n[A]&&C<A))+((n[C]>n[B]&&B>C)||(n[B]>n[C]&&B<C))==3)
			{
				for(i=1;i<4;i++)
					cout<<m[i];             //???????
			}
		}
	}
	return 0;                          //??
}
int main()
{                      // A B C????????0?1?2?a b c???????????1?2?3
	 for (int a = 1; a <= 3; a++)
     {
         for (int b = 1; b <= 3; b++)
         {
             for (int c = 1; c <= 3; c++)                                 // ?????????1?2?3?a,b,c???
             {
				 if (((b > a) + (a == c) + a == 3)
				      && ((b < a) + (a > c) + b == 3)
				      && ((c > b) + (b > a) + c == 3))            // ???????????????????????3
				 {
				     if (a > b && b > c)
                        cout << "C" << "B" << "A" << endl;
                     else if (a > c && c > b)
                          cout << "B" << "C" << "A" << endl;
                     else if (b > a && a > c)
                          cout << "C" << "A" << "B" << endl;
                     else if (b > c && c > a)
                          cout << "A" << "C" << "B" << endl;
                     else if (c > a && a > b)
                          cout << "B" << "A" << "C" << endl;
                     else if (c > b && b > a)
                          cout << "A" << "B" << "C" << endl;       // ???????????????
				 }
             }
         }
     }
     return 0;
}
int main()
{ int vol[3]={0},judge[3]={0},i,j,k,ri,rj;         //??vol?judge????????????????
  for(i=0;i<3;i++)
  {
	  for(j=0;j<3;j++)
	  {
		  for(k=0;k<3;k++)
		  {
			  vol[0]=i;vol[1]=j;vol[2]=k;
			  judge[0]=(vol[0]<vol[1])+(vol[2]==vol[0]);
			  judge[1]=(vol[0]>vol[1])+(vol[0]>vol[2]);
			  judge[2]=(vol[2]>vol[1])+(vol[1]>vol[0]);  //??????????

			  for(ri=0;ri<3;ri++)
			  {
				  for(rj=0;rj<3;rj++)
				  {
					  if( (vol[ri]>=vol[rj]) && (judge[ri]>judge[rj]) ) goto NextTime;  //?????????????????????????
				  }
			  }

			  for(ri=2;ri>=0;ri--)
			  {
				  for(rj=0;rj<3;rj++)
				  {
					  if(vol[rj]==ri) cout<<(char)(rj+65);  //?????????????????goto?????????
				  }
				  
			  }
			  goto endall ;

			  NextTime:  ;
		  }
	  }
  }
  endall: ;


	return 0;
}
int main()
{
    int A=0,B=0,C=0,a2,b2,c2,a1,b1,c1;
    for(A=0;A<3;A++)
    {
        for(B=0;B<3;B++)
        {
            for(C=0;C<3;C++)    //??????ABC?????
            {
                a1=B>A;
                a2=C==A;
                b1=A>B;
                b2=A>C;
                c1=C>B;
                c2=B>A;     //??????
                if(A>B&&a1+a2<b1+b2)
                {
                    if(B>C&&b1+b2<c1+c2)
                        cout<<"CBA";
                    else if(B<C&&b1+b2>c1+c2)
                    {
                        if(A>C&&a1+a2<c1+c2)
                            cout<<"BCA";
                        else if(A<C&&a1+a2>c1+c2)
                            cout<<"BAC";
                    }
                }
                else if(A<B&&a1+a2>b1+b2)
                {
                    if(A>C&&a1+a2<c1+c2)
                        cout<<"CAB";
                    else if(A<C&&a1+a2>c1+c2)
                    {
                        if(C>B&&c1+c2<b1+b2)
                            cout<<"ABC";
                        else if(C<B&&c1+c2>b1+b2)
                            cout<<"ACB";            //??????????
                    }
                }
            }
                
        }
    }
    return 0;
}
int main()
{
	int a, b, c;
	for(a = 1; a <= 3; a++)
	{
		for(b = 1; b <= 3; b++)
		{
			for(c = 1; c <= 3; c++)
			{
				if(a != b && a != c && b != c)
				{
					int ca = 0;
					int cb = 0;
					int cc = 0;
					if(b < a)
						ca++;
					if(c == a)
						ca++;
					if(a < b)
						cb++;
					if(a < c)
						cb++;
					if(c < b)
						cc++;
					if(b < a)
						cc++;
					if(a - ca == 1 && b - cb == 1 && c - cc == 1)
					{
					if(a == 3)
						cout << "A";
					if(b == 3)
						cout << "B";
					if(c == 3)
						cout << "C";
					if(a == 2)
						cout << "A";
					if(b == 2)
						cout << "B";
					if(c == 2)
						cout << "C";
					if(a == 1)
						cout << "A";
					if(b == 1)
						cout << "B";
					if(c == 1)
						cout << "C";}
				}
			}
		}
	}
	return 0;
}
int main()
{
	char a[3];
	int i,j,k,l,b[3];
	for(i=0;i<3;i++)
		for(j=0;j<3;j++)
			for(k=0;k<3;k++)
			{
				if(i==j||i==k||j==k)
					continue;
				b[0]=((i<j)+(i==k)+i);
				b[1]=((i>j)+(i>k)+j);
				b[2]=((k>j)+(j>i)+k);
				if((b[0]+b[1]+b[2])==6)
				{
					a[i]='A';
					a[j]='B';
					a[k]='C';
				}
			}
			for(l=0;l<3;l++)
					cout<<a[l];
						return 0;
}
// ???.cpp: ??????
//???
//1000062701
int main()
{
	int a, b, c, x, y, z;
	for( a = 0; a < 3; a++ )
		for( b = 0; b < 3; b++ )
			for( c = 0; c < 3; c++ )
			{
				x = ( b > a ) + ( c == a );
				y = ( a > b ) + ( a > c );
				z = ( c > b ) + ( b > a );
				if( a + x == 2&& b + y == 2 && c + z == 2 )
				{
					if( a > b )
						if( b > c)
							cout << "CBA" << endl;
						else
							cout << "BCA" << endl;
					if( c > a )
						if( a > b )
							cout << "BAC" << endl;
						else
							cout << "ABC" << endl;
					if( b > a )
						if( c > a )
							cout << "ACB" << endl;
						else
							cout << "CAB" << endl;
				}
			}
	return 0;
}
void bijiao(int, int, int);
int main()
{
	int a, b, c;
	for (a = 1; a <= 3; a++)
		for (b = 1; b <= 3; b++)
			for (c = 1; c <= 3; c++)
			{
				bijiao (a, b, c);
			}
			return 0;
}
void bijiao(int a,int b,int c)
{
	int ca = (b > a) + (c == a);
	int cb = (a > b) + (a > c);
	int cc = (c > b) + (b > a);
	if(((a > b && ca < cb) || ( a == b && ca == cb) || (a < b && ca > cb))
       + (( a > c && ca < cc) || ( a == c && ca == cc) || ( a < c && ca > c))
       + (( b < c && cb > cc) || (b > c && cb < cc) || ( b == c && cb == cc)) == 3)
	{
		if (a >= b)
		{
			if (c >= b)
			{
				if (a >= c)
					cout << "BCA";
				else cout << "BAC";
			}
			else cout << "CBA";
		}
		else 
			if(c <= b)
		{
			if (a <= c)
				cout << "ACb";
			else cout << "CAB";
		}
			else cout << "ABC";
	}
}
int main()
{
	int i,j,m,n,a,b,c;
	char name[4]={0,'A','B','C'};
	int fan[4][2];//fan[i][0]????;fan[i][1]=i(1,2,3??a,b,c)
	for(i=0;i<4;i++)
	{
		fan[i][0]=0;
		fan[i][1]=i;
	}
	for(a=0;a<3;a++)
	{
		for(b=0;b<3;b++)
		{
			if(b==a)
				continue;
			c=3-a-b;
			if((((b>a)+(c==a)+a)==2)&&(((a>b)+(a>c)+b)==2)&&(((c>b)+(b>a)+c)==2))
			{
				fan[1][0]=a;fan[1][1]=1;fan[2][0]=b;fan[2][1]=2;fan[3][0]=c;fan[3][1]=3;
				for(i=1;i<4;i++)
				{
					for(j=1;j<4-i;j++)
					{
						if(fan[j+1][0]<fan[j][0])
						{
							m=fan[j+1][0];
							n=fan[j+1][1];
							fan[j+1][0]=fan[j][0];
							fan[j+1][1]=fan[j][1];
							fan[j][0]=m;
							fan[j][1]=n;
						}
					}
				}
				cout<<name[fan[1][1]]<<name[fan[2][1]]<<name[fan[3][1]];
			}
		}
	}	return 0;
}