semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**
* @file homework.cpp
* @author ???
* @date 2011-10-12
* @description
* ??????: ???
*/
int main()
{
	int riceA, riceB, riceC, wordA, wordB, wordC;
	for (riceA=0;riceA<=2;riceA++)
		for (riceB=0;riceB<=2;riceB++)
			{if (riceB==riceA) continue;
			for (riceC=0;riceC<=2;riceC++)
				{if (riceC==riceA||riceC==riceB) continue;
					wordA=(riceB>riceA)+(riceC==riceA);
					wordB=(riceA>riceB)+(riceA>riceC);
					wordC=(riceC>riceB)+(riceB>riceA);
					if ((wordA+riceA==2)&&(wordB+riceB==2)&&(wordA+riceA==2)) 
						{
						if ((riceA<riceB)&&(riceA<riceC)&&(riceB<riceC)) cout<<"ABC";
						if ((riceA<riceB)&&(riceA<riceC)&&(riceB>riceC)) cout<<"ACB";
						if ((riceB<riceA)&&(riceB<riceC)&&(riceA<riceC)) cout<<"BAC";
						if ((riceB<riceA)&&(riceB<riceC)&&(riceA>riceC)) cout<<"BCA";
						if ((riceC<riceA)&&(riceC<riceB)&&(riceA<riceB)) cout<<"CAB";
						if ((riceC<riceA)&&(riceC<riceB)&&(riceA>riceB)) cout<<"CBA";
						}
				}	
			}
return 0;
}
/*
 * ???????.cpp
 * ?????
 * ????: 2012-10-23
 * ??????
 */
int main(){																	//?????
	int a,b,c=0,i=0;														//???????a,b,c,i
	for(a=0;a<=2;a++){
		for(b=0;b<=2;b++){
			if(b==a)continue;
			for(c=0;c<=2;c++){
				if(c==a||c==b)continue;										//????
				if(a+(b>a)+(c==a)==2&&b+(a>b)+(a>c)==2&&c+(c>b)+(b>a)==2)	//??
				{
					for(i=0;i<=2;i++)										//???????
					{
						if(a==i)cout<<"A";
						if(b==i)cout<<"B";
						if(c==i)cout<<"C";									//?i????????????
					}														//i?????
				}
			}
		}
	}																		//??????
	return 0;
}																			//?????
//============================================================================
// Name        : 15.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================


int main() {
	char a,b,c;
	char a2,b2,c2;
	for(char a1=1;a1<=3;a1=a1+1)
	{
		for(char b1=1;b1<=3;b1=b1+1)
		{
			for(char c1=1;c1<=3;c1=c1+1)
			{
				int x=(a1!=b1)+(a1!=c1)+(b1!=c1);
				if(x==3)
				{
				    a=a1;
				    b=b1;
				    c=c1;
				    a2=(b>a)+(c==a);
				    b2=(a>b)+(a>c);
				    c2=(c>b)+(b>a);
				    int a3=(a>b)-(a2>b2);
				    int b3=(a>c)-(a2>c2);
				    int c3=(b>c)-(b2>c2);
				    int d=(a3==0)+(b3==0)+(c3==0);//?????????????
				    if(d==0)
				    {
					    if(a==1)                  //?9?if????????????????????????
					    	cout<<"A";
					    if(b==1)
					    	cout<<"B";
					    if(c==1)
					    	cout<<"c";
					    if(a==2)
					    	cout<<"A";
					    if(b==2)
					    	cout<<"B";
					    if(c==2)
					    	cout<<"C";
					    if(a==3)
					    	cout<<"A";
					    if(b==3)
					    	cout<<"B";
					    if(c==3)
					    	cout<<"C";
				    }

				}
			}
		}
	}

	return 0;
}
/*
 * checklimit.cpp
 *
 *  Created on: 2013-10-25
 *      Author: g199
 */



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
	(((B > A) + (C == A) + A == 3) + ((A > B)+ (A > C) + B == 3) + ((C > B)+ (B > A) + C == 3) == 3)
		{
		int man[3];
		man[0]= A * 1000 + 'A';
		man[1]= B * 1000 + 'B';
		man[2]= C * 1000 + 'C';
		sort(man,man+3);
		cout << (char)(man[0]%1000) << (char)(man[1]%1000) << (char)(man[2]%1000) <<endl;
		}
	return 0;
}
int main()
{
	int A,B,C;            //????
	A=B=C=0;
	A=30;B=20;C=10;
		if(B<A&&C!=A&&A>C&&C>B)	//????????????????
			cout<<"CBA";      //????????????????
    A=30;C=20;B=10;
	if(B<A&&C!=A&&A>B&&A>C&&C>B||B>A)
			cout<<"BCA";
	B=30;A=20;C=10;
		if(A<B&&A<C)
			cout<<"CAB";
   B=30;C=20;A=10;
		if(A<B&&A<C&&B>A&&C==A)
			cout<<"ACB";
	C=30;B=20;A=10;
		if(C<B&&B<A)
			cout<<"ABC";
	C=30;A=20;B=10;
		if(C<B&&B<A)
			cout<<"BAC";
    return 0;                                  
}
//****************************************
//???
/*3?????????????? 
A??B??????C??????? 
B??A??????A??C??? 
C????B????B?A???? 
????????????????????? 
???????????3??????*/
//****************************************
int main()
{
	int a,b,c,sum1,sum2,sum3;
	int	i,j,sum=0;                             
	for(a=0;a<3;a++)
	{
		for(b=0;b<3;b++)
		{
			for(c=0;c<3;c++)                           //??A,B,C????
			{
				sum1=(b>a)+(c==a);
				sum2=(a>b)+(a>c);
				sum3=(c>b)+(b>a);                      //???????????
				int m[3]={sum1,sum2,sum3},q;           //m[]???????
				if(sum1+sum2+sum3!=3)
					continue;                          //?????
				else
				{  
					int n[3]={a,b,c},p;                 //n[]????
					char o[3]={'A','B','C'},e;          //????ABC
                        o[0]='A';
						o[1]='B';
						o[2]='C';  
					for(i=0;i<3;i++)                    //?????????
					{
						for(j=0;j<2;j++)                //????
						{
							if(n[j]>n[j+1])
							{
								p=n[j];
								n[j]=n[j+1];
								n[j+1]=p;
								q=m[j];
								m[j]=m[j+1];
								m[j+1]=q;               //?????????????
								e=o[j];
								o[j]=o[j+1];
								o[j+1]=e;               //??????????
							}
						}
					}
					sum=0;
					for(i=0;i<3;i++)
					{
						if(n[i]+m[i]==2)
							sum=sum+1; 
					}
					if(sum==3)                          //?????????????????????????
					{
						for(i=0;i<3;i++)
						 cout<<o[i];
					}
					break;                              //?????
				}
			}
		}
	}
	cin.get();
	return 0;
}
int main()
{
	int A,B,C,i=0;
	int state[3];
	char name[3];
	for(A=0;A<3;A++)
	{
		for(B=0;B<3;B++)
		{
			if(A==B) continue;
			C=3-A-B;
			state[A]=(B>A)+(C==A);
			state[B]=(A>B)+(A>C);
			state[C]=(C>B)+(B>A);
			if(state[A]+A==2&&state[B]+B==2&&state[C]+C==2)
			{
				name[A]='A';
				name[B]='B';
				name[C]='C';
				for(i=0;i<3;i++)
					cout<<name[i];
			}
		}
	}
	cout<<endl;
	return 0;
}
int main()
{
	int A, B, C, a, b, c;
	for (A = 1; A <= 3; A++)
		for (B = 1; B <= 3; B++)
			for (C = 1; C <= 3; C++)
			{
				a = (B > A) + (C == A);
				b = (A > B) + (A > C);
				c = (C > B) + (B > A);
				if (A==3-a && B==3-b && C == 3-c && A!=B&&B!=C&&A!=C)
				{

	for (int i=1; i <=3; i++) {
		if (i == A)
			cout << "A";
		if (i == B)
			cout << "B";
		if (i == C)
			cout << "C";
	}}}

	return 0;
}
int main()
{
	int a, b, c, A, B, C, t;
	for (a = 1; a <= 3; a++)
		for (b = 1; b <= 3; b++)
			for (c = 1; c <= 3; c++)
			{
				A = (b > a)+(c == a);
				B = (b < a)+(c < a);
				C = (c > b)+(b > a);
				if (a+A == b+B && b+B ==c+C)
				{
					if(a<b && a<c) 
					{cout << 'A' ;
					if(b<c) cout<<'B'<<'C';
					else cout<<'C'<<'B';}

					if(b<a && b<c) 
					{cout << 'B' ;
					if(a<c) cout<<'A'<<'C';
					else cout<<'C'<<'A';}
					if(c<a && c<b) 
					{cout << 'C';
					if(a<b) cout<<'A'<<'B';
					else cout<<'B'<<'A';}
				}

			}
	return 0;

}
int main()
{
	int a,b,c;
	char s[3];
	int i,j,k,m;
	cout<<"BCA"<<endl;
	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(((3-a)==(b>a)+(c==a))&&((3-b)==(a>b)+(a>c))&&((3-c)==(c>b)+(b>a)))
					{char f[4];
				f[a]='A';f[b]='B';f[c]='C';
				cout<<f[1]<<f[2]<<f[3];
					}

			}
		}
	}
	return 0;
}
/**
 * @file    3.cpp              
 * @author  ??? 1100013230               
 * @date    2011-10-13         
 * @descrption        
 *          ??????????    
*/

int main()
{
    int A, B, C;                      // A?B?C????A?B?C???
	for (A = 0; A <= 2; A++)
	{
		for (B = 0; B <= 2; B++)      // ?A?B?C???????
		{
            if (B == A)               // A?B?C???
				continue;
			else
			{
				C = 3 - B - A;
				if (((B > A) + (C == A) == (2 - A)) && ((A > B) + (A > C) == (2 - B)) && ((C > B) + (B > A) == (2 - C)))  // ??????????????????
				{
					if (A < B && A < C)
					{
						cout << "A";
						if (B < C)
						    cout << "B" << "C";
						else
							cout << "C" << "B";
                    }
					if (B < A && B < C)
					{
						cout << "B";
						if (A < C)
						    cout << "A" << "C";
						else
							cout << "C" << "A";
                    }
					if (C < B && C < A)
					{
						cout << "C";
						if (B < A)
						    cout << "B" << "A";
						else
							cout << "A" << "B";             // ???????????A?B?C?????????
                    }
				}
			}
		}
	}
	return 0;
}
int main()
{
  int a[3],b[3];
  int i;
  for(a[0]=0;a[0]<3;a[0]++)
  {
      for(a[1]=0;a[1]<3;a[1]++)
      {
          for(a[2]=0;a[2]<3;a[2]++)
          {
              if((a[0]!=a[1])&&(a[0]!=a[2])&&(a[1]!=a[2]))





               b[0]=(a[1]>a[0])+(a[2]==a[0]);
               b[1]=(a[0]>a[1])+(a[0]>a[2]);
               b[2]=(a[2]>a[1])+(a[1]>a[0]);
               if((a[0]+b[0]==2)&&(a[1]+b[1]==2)&&(a[2]+b[2]==2))
              {
                  if((a[0]==2)&&(a[1]==1))
                  {
                      cout<<"ABC"<<endl;
                  }
                  if((a[0]==2)&&(a[2]==3))
                  {
                      cout<<"ACB"<<endl;
                  }
                  if((a[1]==2)&&(a[2]==1))
                  {
                      cout<<"BCA"<<endl;
                      break;
                  }
                  if((a[1]==2)&&(a[0]==1))
                  {
                      cout<<"BAC"<<endl;

                  }
                  if((a[2]==2)&&(a[0]==1))
                  {
                      cout<<"CAB"<<endl;
                  }
                  if((a[2]==2)&&(a[1]==1))
                  {
                      cout<<"CBA"<<endl;
                  }

              }

          }
      }
  }
  return 0;
}
//??????//
//??????//
//???1000011029//
//???2010?11?20?//



int main()
{
	int a = 0;                                           //??????a???//
	int b = 0;                                           //??????b???//
	int c = 0;                                           //??????c???//
	char temp[3];                                        //??????????//

	for( a = 0;a < 3;a++ )                               //??????2????0//
		for( b = 0;b < 3;b++)                            //?????????//
			for( c = 0;c < 3;c++ )
			{
				if( ( b > a ) + ( c == a ) == 2 - a
					&& ( b < a ) + ( a > c ) == 2 - b
					&& ( c > b ) + ( b > a ) == 2 - c )     //????????//
				{
					temp[a] = 'A';                          //??????//
					temp[b] = 'B';
					temp[c] = 'C';

					cout << temp[0] << temp[1] << temp[2] ; //?????//
				}

			}



	return 0;

}
int main()
{
	int a,b,c;                                                   //????a,b,c,????A,B,C???(0-2)
	char man[3];                                                 //?????man,???????????
	for(a=0;a<3;a++)                                             //??,A,B,C???
	{
		for(b=0;b<3;b++)
		{
			for(c=0;c<3;c++)
			{
				int a1=(b>a)+(c==a);                             //A??B??????C???????
				int b1=(a>b)+(a>c);                              //B??A??????A??C???
				int c1=(c>b)+(b>a);                              //C????B????B?A???
				if(((a+a1)==2)&&((b+b1)==2)&&((c+c1)==2))        //??????????????????,??????(0-2)???????????2
				{
					man[a]='A';                                  //?????????
					man[b]='B';
					man[c]='C';
					for(int i=0;i<=2;i++)                        //???????????
					{
						cout<<man[i];
					}
					cout<<endl;
				}
			}
		}
	}
	return 0;
}
/**
 * ? ? ?????
 * ?    ?????
 * ????: 2010?11?12?
 * ???????A?B?C????????????????????
*/
int main()
{
	int A, B, C;										//??3?????	
	int As, Bs, Cs;										//??3?????
	int Al, Bl, Cl;										//?????????
	for (A = 1; A <= 3; A++)							
	{
		for (B = 1; B <= 3; B++)
	{
			for (C = 1; C <= 3; C++)
	{
		As = (B > A) + (C == A);	//A???
		Bs = (A > B) + (A > C);	//B???
                  Cs = (C > B) + (B > A);	//C???
        if (! ( A <= B && As <= Bs || A <= C && As <= Cs || B <= A && Bs <= As || B <= C && Bs <= Cs || C <= A && Cs <= As || C <= B && Cs <= Bs ))
	{	//?????????????????
                                             Al = A;	//???????????????????????????????????????
					Bl = B;
					Cl = C;
				}
			}
		}
	}
	if (Al >= Bl && Bl >= Cl)		//????????3???
		cout<<"ABC"<<endl;
	if (Al >= Cl && Cl >= Bl)
		cout<<"BCA"<<endl;
	if (Bl >= Al && Al >= Cl)
		cout<<"BAC"<<endl;
	if (Bl >= Cl && Cl >= Al)
		cout<<"BCA"<<endl;
	if (Cl >= Al && Al >= Bl)
		cout<<"CAB"<<endl;
	if (Cl >= Bl && Bl >= Al)
		cout<<"CBA"<<endl;
	return 0;
}
int main ()
{
	int A,B,C,TA,TB,TC;
	for(A=1;A<=3;A++)
		for(B=1;B<=3;B++)
			for(C=6-A-B;C<=3;C++)
			{
				if(A==B)break;
				else
				{
					TA=(A<B)+(A==C)+A;
					TB=(B<A)+(C<A)+B;
					TC=(B<C)+(A<B)+C;
					if(TA==3&&TB==3&&TC==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&&C<A)cout<<"CBA";
					}
				}
			}
	return 0;
}
int main()
{
     int A,B,C;
     char rank[4];
     for(A=1;A<=3;A++)
       for(B=1;B<=3;B++) 
         {if(A==B)continue;
          else
            {C=6-A-B;                          //??ABC???? 
             if( (B==1)&&(A>B)&&(A>C) && ( (C==2)&&((C>B)+(B>A)==1)&&(A>B) 
                 || (A==2)&&(B>A)&&((C>B)+(B>A)==0))  )  
                            //?B????C????????? 
                     {rank[A]='A';                    //??????? 
                      rank[B]='B';
                      rank[C]='C';
                      cout<<rank[1]<<rank[2]<<rank[3];}    
                          //?????ABC???? 
               if( (C==1)&&(C>B)&&(B>A) && ( (B==2)&&((A>B)+(A>C)==1)&&((A>B)+(B>A)==0) || (A==2)&&(B>A)&&((A>B)+(A>C)==0) ))
                           {rank[A]='A';
                            rank[B]='B';
                            rank[C]='C';
                            cout<<rank[1]<<rank[2]<<rank[3];}
              }}
     return 0;
}
int main()
{
	int a,b,c;
	for(a=0;a<=2;a++)
		for(b=0;b<=2;b++)
		{
			if(a==b)continue;
			else
			{
				c=3-a-b;
				if(((a+(b>a)+(c==a))==2)&&((b+(a>b)+(a>c))==2)&&((c+(c>b)+(b>a))==2))
				{
					if(a<b&&b<c)cout<<"ABC";
					else if(a<c&&c<b)cout<<"ACB";
					else if(b<a&&a<c)cout<<"BAC";
					else if(b<c&&c<a)cout<<"BCA";
					else if(c<a&&a<b)cout<<"CAB";
					else cout<<"CBA";
					break;
				}
			}
		}
	return 0;
}
//****************************************************************
// ???wusy                                                    *
// ???11,17                                                   *
// ??????                                                  *
//****************************************************************
int main()
{
	int sa,sb,sc;
	for(int a = 1; a <= 3; a++)
		for(int b = 1; b <= 3; b++)
			for(int c = 1; c <= 3; c++)
			{
				sa = (b > a) + (c == a);
				sb = (a > b) + (a > c);
				sc = (c > b) + (b > a);

				if( (a+sa == 3) && (b+sb == 3) && (c+sc == 3) )
				{
					if(a>b && b>c)
						cout << "CBA";
					if(a>c && c>b)
						cout << "BCA";
					if(b>c && c>a)
						cout << "ACB";
					if(b>a && a>c)
						cout << "CAB";
					if(c>b && b>a)
						cout << "ABC";
					if(c>a && a>b)
						cout << "BAC";
				}
			}
	return 0;
}
int main() {
	int a,b,c,x,y,z;//?a b c?????????? x y z????????????
	a=3;b=2;c=1;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(x<y&&y<z){ cout<<"C"<<"B"<<"A";return 0;}
	a=3;b=1;c=2;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(x<z&&z<y) {cout<<"B"<<"C"<<"A";return 0;}
	a=2;b=3;c=1;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(y<x&&x<z) {cout<<"C"<<"A"<<"B";return 0;}
	a=2;b=1;c=3;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(z<x&&x<y) {cout<<"B"<<"A"<<"C";return 0;}
	a=1;b=2;c=3;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(z<y&&y<x){ cout<<"A"<<"B"<<"C";return 0;}
	a=1;b=3;c=2;
	x=((b>a)+(c==a));y=((a>b)+(a>c));z=((c>b)+(b>a));
	if(y<z&&z<x){ cout<<"A"<<"C"<<"B";return 0;}
}
//***********************
//??????
//?????
//???2011.10.16
//***********************
int main()          //???
{                 //?????
	int a, b, c;         //????A?B?C???
	a = 3;                //???????????
	b = 2;
	c = 1;
	if((b <= a && c != a) + (a > b || a > c) + (c > b && b > a) == 3) 
		cout << "CBA";
	else 
	{
		a = 3;
	    b = 1;
	    c = 2;
	    if((b <= a && c != a) + (a > b && a > c) + (c > b || b > a) == 3)
			cout << "BCA";
		else
		{
			a = 2;
	        b = 1;
          	c = 3;
            if((b > a || c == a) + (a > b && a > c) + (c <= b && b <= a) == 3)
		        cout << "BAC";
			else
			{
				a = 2;
             	b = 3;
	            c = 1;
                if((b > a || c == a) + (a <= b && a <= c) + (c > b && b > a) == 3)
		            cout << "CAB";
				else
				{
					a = 1;
	                b = 2;
	                c = 3;
                    if((b > a && c == a) + (a <= b || a <= c) + (c <= b && b <= a) == 3)
		                cout << "ABC";
					else
					{
						a = 1;
	                    b = 3;
	                    c = 2;
                        if((b > a && c == a) + (a <= b && a <= c) + (c <= b || b <= a) == 3)
	                     	cout << "ACB";
					}
				}
			}
		}
	}
	return 0;
}          //?????
/*??????
???3?????????????? 
     A??B??????C??????? 
     B??A??????A??C??? 
     C????B????B?A???? 
     ????????????????????? 
     ???????????3??????
?????????????3??????? ABC
?????
???2013.10.13
*/
int main()
{
	int A=0,B=0,C=0;           //?????????ABC??? 
	int a=0,b=0,c=0;           //?????????ABC???????? 
	int i;                     //??????????? 
	for(A=0;A<=2;A++)           //?????????ABC??? 
	    for(B=0;B<=2;B++)
	        for(C=0;C<=2;C++)
	        {
	        	a=(B>A)+(C==A);//A??? 
	        	b=(A>B)+(A>C); //B??? 
	        	c=(C>B)+(B>A); //C??? 
	        	if((a+A==2)&&(b+B==2)&&(c+C==2)==1)//????????????????????????????????2 
	        	{
	        		//cout<<a<<b<<c;
					for(i=2;i>=0;i--)     //???????2??????????????????????2?1?0????????0?1?2?? 
	        		{
	        			if(a==i)    
	        			cout<<"A";
	        			if(b==i)
	        			cout<<"B";
	        			if(c==i)
	        			cout<<"C";
	        		}
	        		break;
	        	}
	        }
	return 0;
	
}
int main(){
	int a,b,c;
	//cout<<(a<b)<<endl;
	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)
			continue;
		else{
			if(a+(b>a)+(c==a) == b+(a>b)+(a>c) && b+(a>b)+(a>c) == c+(c>b)+(b>a)){ 
				if(a == 3){
					if(b ==2){
						cout<<"CBA"<<endl;
					}
					else{
						cout<<"BCA"<<endl;	
					}
				}
				else if(b == 3){
					if(a ==2){
						cout<<"CAB"<<endl;
					}
					else{
						cout<<"ACB"<<endl;	
					}
				}
				else{
					if(b ==2){
						cout<<"ABC"<<endl;
					}
					else{
						cout<<"BAC"<<endl;	
					}
				}
			}
		}	
		
		
	}
	cin>>a;
	return 0;
}
/*
??
???
????yang?
???2012.10.14
*/

int main()
{
	int a,b,c,ah,bh,ch,abc[4],zh,f[4];
	char m[4],z;
	for(a=1;a<=3;a++)
	{
		for( b=1;b<=3;b++)
		{
			for( c=1;c<=3;c++)
			{
				ah=(b>a)+(c==a);
				bh=(a>b)+(a>c);
				ch=(c>b)+(b>a);
				if(((ah-bh)*(a-b)<0)&&((ch-bh)*(c-b)<0)&&((ah-ch)*(a-c)<0))
				{f[1]=a;f[2]=b;f[3]=c;}
				if(a==b&&ah==bh&&((ch-bh)*(c-b)<0)&&((ah-ch)*(a-c)<0))
				{f[1]=a;f[2]=b;f[3]=c;}
				if(a==c&&ah==ch&&((ah-bh)*(a-b)<0)&&((ch-bh)*(c-b)<0))
				{f[1]=a;f[2]=b;f[3]=c;}
				if(b==c&&bh==ch&&((ah-bh)*(a-b)<0)&&((ah-ch)*(a-c)<0))
				{f[1]=a;f[2]=b;f[3]=c;}
				if(a==b&&b==c&&ah==bh&&bh==ch)
			    {f[1]=a;f[2]=b;f[3]=c;}
			}
		}
	}//???????????a,b,c??????????f[]
	
	for (int i=1;i<=3;i++)
	{
		m[i]=i+64;
	}//?m[]??????ABC
	for(int j=1;j<=3;j++)
	{
		for(int k=1;k<=3;k++)
			if(f[j]<f[k]&&j>k)
			{
				z=m[j];
				m[j]=m[k];
				m[k]=z;
				zh;
				zh=f[j];f[j]=abc[k];f[k]=zh;
			}
	}//??????ABC
	cout<<m[1]<<m[2]<<m[3]<<endl;//????????
	
	
	return 0;
}
int main()
{
	int a,b,c,t1,t2,t3;
	for(a=1;a<=3;a++)
	{
		for(b=1;b<=3;b++)
		{
			for(c=1;c<=3;c++)//???????????3,2,1??????????
			{
				if(c!=b&&c!=a&&b!=a)//?a,b,c?????????
				{
					t1= (b>a) + (a==c);
					t2= (a>b) + (a>c);
					t3= (c>b) + (b>a);//t1,t2,t3????a?b?c???????????
					if( a==1 && t1>t2 && t1>t3 )
					{if (b==2) cout<<"A"<<"B"<<"C";
					else       cout<<"A"<<"C"<<"B";
					}
					if( b==1 && t2>t1 && t2>t3 )
					{if (a==2)  cout<<"B"<<"A"<<"C";
					else        cout<<"B"<<"C"<<"A";
					}
					if( c==1 && t3>t1 && t3>t2 ) 
					{if (a==2)  cout<<"C"<<"A"<<"B";
					else        cout<<"C"<<"B"<<"A";
					}//???????????????????????
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a[3];
	int i,j,k,r1,r2,r3,l,q,w,e;
	for(q=1;q<3;q++);
	{
		for(w=1;w<3;w++)
		{
			for(e=1;e<3;e++)
			{
				a[0]=q;
				a[1]=w;
				a[2]=e;
				i=((a[1]>a[0])+(a[2]==a[0]));
				j=((a[0]>a[1])+(a[0]>a[2]));
				k=((a[2]>a[1])+(a[1]>a[0]));
				r1=((i<=j&&a[0]>=a[1])||(i>=j&&a[0]<=a[1]));
				r2=((i<=k&&a[0]>=a[2])||(i>=k&&a[0]<=a[2]));
				r3=((j<=k&&a[1]>=a[2])||(j>=k&&a[1]<=a[2]));
				if(r1+r2+r3==3)
				{
										for(l=1;l<=3;l++)
					{
						if(a[0]==l)
							printf("A");
						if(a[1]==l)
							printf("B");
						if(a[2]==l)
							printf("C");
					}
					return 0;
				}
			}
		}
	}
	return 0;
}
int main()
{
	int A,B,C,a,b,c;
	for (A=1;A<=3;A++)
		for (B=1;B<=3;B++)
			for (C=1;C<=3;C++)
			{
				a=(B>A)+(C==A);
				b=(A>B)+(A>C);
				c=(C>B)+(B>A);
				if (a==2&&b==1&&c==0&&C>B&&B>A)
					cout<<"A"<<"B"<<"C"<<endl;
				if (a==2&&b==0&&c==1&&B>C&&C>A)
					cout<<"A"<<"C"<<"B"<<endl;
				if (a==1&&b==2&&c==0&&C>A&&A>B)
					cout<<"B"<<"A"<<"C"<<endl;
				if (a==1&&b==0&&c==2&&B>A&&A>C)
					cout<<"C"<<"A"<<"B"<<endl;
				if (a==0&&b==1&&c==2&&A>B&&B>C)
					cout<<"C"<<"B"<<"A"<<endl;
				if (a==0&&b==2&&c==1&&A>C&&C>B)
					cout<<"B"<<"C"<<"A"<<endl;
			}		
			return 0;

}
int main ()
{   int a;
    int b;
    int c;
    for(a=1;a<=3;a++)                                                                                        //???? 
       {  for(b=1;b<=3;b++)
              {   for(c=1;c<=3;c++)
                      {   if((a+(b>a)+(c==a))==(b+(a>b)+(a>c))&&(b+(a>b)+(a>c))==(c+(c>b)+(b>a)))            //???????? 
                             {  int num[3]={a,b,c};                                                          //????? 
                                int mid;
                                int j;
                                int i;
                                for(j=1;j<=2;j++)
                                   {  for(i=0;i<=1;i++)
                                         { if(num[i]>num[i+1])
                                             {  mid=num[i];
                                                num[i]=num[i+1];
                                                num[i+1]=mid;
                                             }
                                         }
                                   }
                                if(num[0]==a)  cout<<"A";                                                 //???????                 // 
                                if(num[0]==b)  cout<<"B";
                                if(num[0]==c)  cout<<"C";
                                if(num[1]==a)  cout<<"A";
                                if(num[1]==b)  cout<<"B";
                                if(num[1]==c)  cout<<"C";
                                if(num[2]==a)  cout<<"A";
                                if(num[2]==b)  cout<<"B";
                                if(num[2]==c)  cout<<"C";
                             }
                      }
              }
       }
 
    return 0;
}
int main()
{
	int a, b, c, i;
	char str[3];
	for( a = 0; a < 3; a++ )
	{
		for( b = 0; b < 3; b++ )
		{
			for( c = 0; c < 3; c++ )
			{
				if( (b > a) + (c == a) + a == 2 &&
					(a > b) + (a > c) + b == 2 &&
					(c > b) + (b > a) + c == 2 &&
					a != b && a != c && b != c )
				{
					str[a] = 'A';
					str[b] = 'B';
					str[c] = 'C';
					for( i = 0; i < 3; i++ )
					{
						cout << str[i];
					}
				}
			}
		}
	}
	cout << endl;
	return 0;
}
int main()
{
	int a,b,c,n;
	
	for(a=0;a<3;a++)
		for(b=0;b<3;b++)
			for(c=0;c<3;c++)
			{
				n=0;
				if(a==2-(b>a)-(c==a))
					n=n+1;
				if(b==2-(a>b)-(a>c))
					n=n+1;
				if(c==2-(c>b)-(b>a))
					n=n+1;
				if(a!=b&&a!=c&&b!=c)
					n=n+1;
				if(n==4)
				{
					if(a==0)
					{
						cout<<"A";
						if(b<c)
							cout<<"BC";
						else
							cout<<"CB";
					}
					if(b==0)
					{
						cout<<"B";
						if(a<c)
							cout<<"AC";
						else
							cout<<"CA";
					}
					if(c==0)
					{
						cout<<"C";
						if(a<b)
							cout<<"AB";
						else
							cout<<"BA";
					}
				}
			}
	return 0;
}