semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
 int a[4],b[4];
 for(int i=1;i<=3;i++)
 {
  a[1]=i;
  for(int s=1;s<=3;s++)
  {
   if(s==i)
    continue;
   a[2]=s;
   for(int t=1;t<=3;t++)
   {
    if(s==t || t==i)
    continue;
    a[3]=t;
    b[1]=(a[2]>a[1])+(a[1]==a[3]);
    b[2]=(a[1]>a[2])+(a[1]>a[3]);
    b[3]=(a[3]>a[2])+(a[2]>a[1]);
    if((a[1]-a[2])*(b[1]-b[2])<0 && (a[1]-a[3])*(b[1]-b[3])<0 && (a[2]-a[3])*(b[2]-b[3])<0)
    {
     int f;
     char c[3]={'A','B','C'},k;
     for(int h=1;h<3;h++)
     {
      for(int g=h;g<3;g++)
      {
       if(a[g]<a[g+1])
       {
        f=a[g];
        a[g]=a[g+1];
        a[g+1]=f;
        k=c[g-1];
        c[g-1]=c[g];
        c[g]=k;
       }
      }
     }
      for(int d=2;d>=0;d--)
      {
       cout<<c[d];
      }
    }
   }
  }
 }
 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((a+(b>a)+(c==a)==2)&&(b+(a>b)+(a>c))==2&&(c+(c>b)+(b>a))==2)
				{
					if(a>b&&a>c)
					{
						if(b>c)
						{
							cout<<"CBA";
						}
						else
						{
							cout<<"BCA";
						}
					}
					if( b>c&&b>a)
					{
					   if(c>a)
					   {
						   cout<<"ACB";
					   }
					   else
					   {
						   cout<<"CAB";
					   }
					}
					if(c>b&&c>a)
					{
						if(b>a)
						{
							cout<<"ABC";
						}
						else
						{
							cout<<"BAC";
						}
					}
				}
			}
		}
	}
	return 0;
}
/*
 * ????compare eat.cpp
 * ?????
 * ????: 2011-11-3
 * ??????????
 */
int main(){
	int a,b,c;//??????????A,B,C
	int as,bs,cs;//??????????????
	char d[4];
	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))//?????????????????
				{
				d[a]='A';d[b]='B';d[c]='C';//????
			    }
			}
	cout<<d[1];
	cout<<d[2];
	cout<<d[3]<<endl;//????????
    return 0;//????
}
int main() {
	int A,B,C,a;
	for(A=0;A<=2;A=A+1){
		for(B=0;B<=2;B=B+1){
			for(C=0;C<=2;C=C+1){
				if((B<A)+(C!=A)==A&&(A<B)+(A<C)==B&&(C<B)+(B<A)==C&&A!=B&&A!=C&&B!=C)break;}
			if((B<A)+(C!=A)==A&&(A<B)+(A<C)==B&&(C<B)+(B<A)==C&&A!=B&&A!=C&&B!=C)break;}
		if((B<A)+(C!=A)==A&&(A<B)+(A<C)==B&&(C<B)+(B<A)==C&&A!=B&&A!=C&&B!=C)break;}			//????????3????????????
	for(a=0;a<=2;a=a+1){
		if(A==a)cout<<"A";
		if(B==a)cout<<"B";
		if(C==a)cout<<"C";}																			//??????
	return 0;
}
/*
 * fanliang.cpp
 *
 *  Created on: 2012-10-26
 *      Author: 7
 */
int main()
{
	int a[3],i,j,temp;char c;
	char b[3]={'A','B','C'};
	for(a[0]=1;a[0]<4;a[0]++)
	{
		for(a[1]=1;a[1]<4;a[1]++)
		{
			for(a[2]=1;a[2]<4;a[2]++)
			{
				if((a[1]>a[0])+(a[2]==a[0])==3-a[0]&&(a[0]>a[1])+(a[0]>a[2])==3-a[1]&&(a[2]>a[1])+(a[1]>a[0])==3-a[2])
				{
				     goto loop;
				}
			}
		}
	}
	loop:for(i=0;i<2;i++)
	{
		for(j=0;j<2-i;j++)
		{
			if(a[j]>a[j+1])
			{
				temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
				c=b[j];
				b[j]=b[j+1];
				b[j+1]=c;
			}
		}
	}
	cout<<b[0]<<b[1]<<b[2];
}
int main()
{
	int a,b,c,a1,b1,c1,k;
	char rank[3];
	for(a=0;a<3;a++)
	     for(b=0;b<3;b++)
		     for(c=0;c<3;c++)
		        {
				a1=(b>a)+(c==a);
                b1=(a>b)+(a>c);
				c1=(c>b)+(b>a);
                if((a+a1)==2&&(b+b1)==2&&(c+c1)==2)
				{rank[a]='A';
                rank[b]='B';
	            rank[c]='C';
	            for(k=0;k<3;k++)
                cout<<rank[k];}
				}
	cin.get();
	return 0;
}
int main()
{
	int A,B,C,word[4],i;                                               //?????ABC?????????word?????????
	char rank[4];
	for(A=1;A<=3;A++)
		for(B=1;B<=3;B++)
		{if(B==A)continue;
	        for(C=1;C<=3;C++)
			{if(C==A||C==B)continue;                      //?????????????????????
			word[1]=(B>A)+(C==A);
			word[2]=(A>B)+(A>C);
			word[3]=(C>B)+(B>A);                         //????????
			rank[A]='A';
			rank[B]='B';                             
			rank[C]='C';
			if(word[rank[1]-64]>word[rank[2]-64]&&word[rank[2]-64]>word[rank[3]-64])      //?????????????
				for(i=1;i<4;i++)
					cout<<rank[i];                                           //?????
			}}
	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 (((a>b)+(c==a))==a && ((a<b)+(a<c))==b && ((c<b)+(b<a))==c ) 
				{
					if (b>c&&c>a)
						    cout<<"BCA";
					else if (a>c&&c>b)
					        cout<<"ACB";
					else if (b>a&&a>c)
					        cout<<"BAC";
					else if (a>b&&b>c)
						    cout<<"ABC";
					else if (c>a&&a>b)
						    cout<<"CAB";
					else if (c>b&&b>a)
						cout<<"CBA";
	
				}
			}
return 0;
}
/*
Name:???
ID:1200012842
Email:443972553@qq.com
*/
int main()
{
    int a,b,c; //A,B,C???,?{1,2,3}
    for (a=1;a<=3;a++)
        for (b=1;b<=3;b++)
            for (c=1;c<=3;c++)
                if (a!=b)
                   if (a!=c)
                      if (b!=c)
                         if ((b>a)+a==3)
                            if ((a>b)+(a>c)+b==3)
                               if ((c>b)+(b>a)+c==3)
                                  for (int i=1;i<=3;i++)
                                  {
                                      if (a==i)cout<<'A';
                                      if (b==i)cout<<'B';
                                      if (c==i)cout<<'C';
                                      }
    return 0;
    }
void main()
{
	int i,j,k,i2,j2,k2;
	for(i=0;i<=2;i++)
	{
		for(j=0;j<2;j++)
		{
			for(k=0;k<2;k++)
			{
				i2=j2=k2=0;
				if(i==j||i==k||j==k)
					continue;
				if(j>i)
					i2++;
				if(i==k)
					i2++;
				if(i>j)
					j2++;
				if(i>k)
					j2++;
				if(k>j)
					k2++;
				if(j>j)
					k2++;
				if(i+i2==2&&j+j2==2&&k+k2==2)
				{
					if(i>j&&j>k)
						printf("CBA");
					if(i>k&&k>j)
						printf("BCA");
					if(j>i&&i>k)
						printf("CAB");
					if(j>k&&k>i)
						printf("ACB");
					if(k>i&&i>j)
						printf("BAC");
					if(k>j&&j>i)
						printf("ABC");
				}
			}
		}
	}
}
int main ()
{
	int amount[6][3]={{1,2,3},{1,3,2},{2,1,3},{2,3,1},{3,2,1},{3,1,2}},a=0,b=0,c=0;       //??????
	for (int i=0;i<=5;i++)                                                                //???????????
	{
		int A=0,B=0,C=0;
		if (amount[i][1]>amount[i][0]) {A++;C++;}
		if (amount[i][1]<amount[i][0]) B++;
		if (amount[i][0]>amount[i][2]) B++;
		if (amount[i][2]>amount[i][1]) C++;
		if ((amount[i][0]-amount[i][1])*(A-B)<0&&(amount[i][1]-amount[i][2])*(B-C)<0&&(amount[i][0]-amount[i][2])*(A-C)<0)    //???????
		{
			a=amount[i][0];b=amount[i][1];c=amount[i][2];
		    break;
		}
	}
	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<b&&b<a) cout <<"CBA";
	else if(c<a&&a<b) cout <<"CAB";
	return 0;
}
/******************???**********************
3??????????????
A??B??????C???????
B??A??????A??C???
C????B????B?A????
?????????????????????
???????????3??????
**********************************************
programmer : Qiu Hezi
version:1.0
creat date:2012.10.24.12?30
**********************************************
??????????1?2?3???????
1???????????????123???
2?????????????1,2??
3?????????
************************************************/
///????????????,??????1??????0?
int judge_problem(int a,int b,int c)
{
    int food[4];//food[i]?????i???????????
    food[a] =(b>a)+(c==a);//B??????C???????
    food[b] =(a>b) + (a>c);//A??????A??C???
    food[c] =(c>b) + (b>a);//??B????B?A????
    if ((food[1]>food[2])&&(food[2]>food[3]))
        return 1;
    else
        return 0;
}
///???????a,b,c?????
void print_abc(int a,int b,int c)
{
    for (int i=1;i<=3;i++)
    {
        if (a==i) cout<<'A';
        if (b==i) cout<<'B';
        if (c==i) cout<<'C';
    }
    cout<<endl;
}
int main()
{
    for (int a=1;a<=3;a++)
    {
        for (int b=1;b<=3;b++)
        {
            for (int c=1;c<=3;c++)
            {
                if ((a!=b)&&(b!=c)&&(a!=c))
                    if (judge_problem(a,b,c)==1)
                        print_abc(a,b,c);

            }
        }
    }
}
int main()
{
  int af,bf,cf;
  int ah,bh,ch,i;
  char res[3];
  for(af=0;af<3;af++)
  {
    for(bf=0;bf<3;bf++)
    {
      for(cf=0;cf<3;cf++)
      {
        ah=0;
        bh=0;
        ch=0;
        if(bf>af)ah++;
        if(cf==af)ah++;
        if(af>bf)bh++;
        if(af>cf)bh++;
        if(cf>bf)ch++;
        if(bf>af)ch++;
        if((((ah>bh)&&(af<bf))||((ah==bh)&&(af==bf))||((ah<bh)&&(af>bf)))&&(((bh>ch)&&(bf<cf))||((bh==ch)&&(bf==cf))||((bh<ch)&&(bf>cf)))&&(((ch>ah)&&(cf>af))||((ch==ah)&&(cf==af))||((ch<ah)&&(cf>af))))
        {
           res[2-af]='A';
           res[2-bf]='B';
           res[2-cf]='C';
        }
      }
    }
  }
  cout<<"BCA"<<endl;
  return 0;
}
int main()
{int A,B,C,b[3]={0},a[3]={0};
 for(A=0;A<3;A++)
  {for(B=0;B<3;B++)
    {if(A!=B)
 {C=3-A-B;
        a[0]=(((B<A)+(C==A))==A);
        a[1]=(((A<B)+(A<C))==B);
        a[2]=(((C<B)+(C<A))==C);
        if((a[0]+a[1]+a[2])==3)
        {b[A]='A';
        b[B]='B';
        b[C]='C';
        cout<<(char)(b[2])<<(char)(b[1])<<(char)(b[0]);
		break;}}
 else 
 continue;}}
return 0;
}
int main()
{
int A=0;    //????3?????
int B=0;
int C=0;
int wordA=0;    //??3????????
int wordB=0;
int wordC=0;
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?C????????
                    { wordA=(B>A)+(C==A);   //????A,B,C????
                      wordB=(A>B)+(A>C);
                      wordC=(C>B)+(B>A);
                        if (A>B&&B>C)              //???6??????????
                              {if ((wordA<wordB)&&(wordB<wordC))
                                   {cout<<'C'<<'B'<<'A'<<endl;}
                               }
                        if (A<B&&B<C)
                              {if ((wordB<wordA)&&(wordC<wordB))
                                  {cout<<'A'<<'B'<<'C'<<endl;}
                              }
                        if (A>C&&C>B)
                              {if ((wordA<wordC)&&(wordC<wordB))
                                   {cout<<'B'<<'C'<<'A'<<endl;}
                               }
                        if (B>A&&A>C)
                              {if ((wordB<wordA)&&(wordA<wordC))
                                   {cout<<'C'<<'A'<<'B'<<endl;}
                               }
                        if (B>C&&C>A)
                             {if ((wordB<wordC)&&(wordC<wordA))
                                   {cout<<'A'<<'C'<<'B'<<endl;}
                              }             
                         if (C>A&&A>B)
                             {if ((wordC<wordA&&wordA<wordB))
                                   {cout<<'B'<<'A'<<'C'<<endl;}
                              }
                  }
              }                                                               
         }
   }
 return 0;         

}
int main()
{
	int a,b,c,k[4]={0};
	for(a=1;a<=3;a++)
	for(b=1;b<=3;b++)
	if(b!=a)
	for(c=1;c<=3;c++)
		if(c!=a&&c!=b)
		{
			
			k[1]=(b>a);
			k[2]=(a>b)+(a>c);
			k[3]=(c>b)+(b>a);
			if((k[1]+a==3)&&(k[2]+b==3)&&(k[3]+c==3))
			{
			if(a==1)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;
			}
		}
		return 0;
}
int main()
{
	int a,b,c,a1,a2,b1,b2,c1,c2,t=0;//????
	for(a=0;a<3;a++)
	{
		for(b=0;b<3;b++)
		{
			for(c=0;c<3;c++)
			{
				a1=(b>a),a2=(c==a);
				b1=(a>b),b2=(a>c);
				c1=(c>b),c2=(b>a);//??????
				if(a1+a2==(2-a)&&(b1+b2==(2-b)&&c1+c2==(2-c)))//??????????????
				{
					if(a>b&&b>c)
						cout<<"CBA";
					else if(b>a&&a>c)
	                    cout<<"CAB";
					else if(c>a&&a>b)
					    cout<<"BAC";
					else if(c>b&&b>a)
						cout<<"ABC";
					else if(b>c&&c>a)
						cout<<"ACB";
					else if(a>c&&c>b)
						cout<<"BCA";//????
				}
			}
		
		}
		
	}

			
	return 0;
}
//**********************************
//****       ??????      *****
//****        1200012718       *****
//**         ??????         **
//**********************************
int main()
{
	int x[3]={0,0,0};            //x1x2x3????abc????????012
	for (int a=0;a<3;a++)
		for (int b=0;b<3;b++)
			for (int c=0;c<3;c++)    //abc????0~2??
			{
				int o=(b>a);
				int p=(c==a);
				int q=(a>b);
				int r=(a>c);
				int s=(c>b);
				int t=(b>a);      //opqrst??6???????
				if (o+p+q+r+s+t==3&&a+o+p==2&&b+q+r==2&&c+s+t==2)//?? ????????????????????????????2???a???????????0??????2???2???????
				{
					x[0]=a;
					x[1]=b;
					x[2]=c;             //?abc??
				}
			}
	for (int i=0;i<3;i++)          //????????abc
		for (int j=0;j<3;j++)
		{
			if (x[j]==i)          //x[j]=???????char a=65+j?????abc
			{
				char a=65+j;
				cout<<a;
			}
		}

		return 0;
}
int main()
{
	int a,b,c,i,j,k;
	for(i=1;i<4;i++)
	{
		for(j=1;j<4;j++)
		{
			for(k=1;k<4;k++)
			{
				a=i;
				b=j;
				c=k;
	if((a<b&&c==a)&&(a>b||a>c)&&!(c>b||b>a))
	{
		printf("CBA");
		return 0;
	}

	if((a<b&&c==a)&&!(a>b||a>c)&&(c>b||b>a))
	{
		printf("BCA");
		return 0;
	}
	if((a<b||c==a)&&!(a>b||a>c)&&(c>b&&b>a))
	{
		printf("BAC");
		return 0;
	}
	if((a<b||c==a)&&(a>b&&a>c)&&!(c>b||b>a))
	{
		printf("CAB");
		return 0;
	}
	if(!(a<b&&c==a)&&(a>b&&a>c)&&(c>b||b>a))
	{
		printf("ACB");
		return 0;
	}
	if(!(a<b&&c==a)&&(a>b||a>c)&&(c>b&&b>a))
	{
		printf("ABC");
		return 0;
	}
			}
		}
	}
	return 0;
}
/*
 *100008.cpp
 *??????
 *Created on: 2012-10-5
 *Author:??
 */
int A=0,B=0,C=0;//????
int main(){
	for (A=0;A<3;A++){//?????
		for (B=0;B<3;B++){
			if (A!=B){
			for (C=0;C<3;C++){
				if(C!=A&&C!=B){
					if(((B>A)+(C==A))==2&((A>B)+(A>C))==1&((C>B)+(B>A))==0&(C>B>A)==1)//????????
						cout<<"ABC"<<endl;
					if(((B>A)+(C==A))==2&((A>B)+(A>C))==0&((C>B)+(B>A))==1&(B>C>A)==1)
						cout<<"ACB"<<endl;
					if(((B>A)+(C==A))==1&((A>B)+(A>C))==0&((C>B)+(B>A))==2&(B>A>C)==1)
						cout<<"CAB"<<endl;
					if(((B>A)+(C==A))==1&((A>B)+(A>C))==2&((C>B)+(B>A))==0&(C>A>B)==1)
						cout<<"BAC"<<endl;
					if(((B>A)+(C==A))==0&((A>B)+(A>C))==1&((C>B)+(B>A))==2&(A>B>C)==1)
						cout<<"CBA"<<endl;
					if(((B>A)+(C==A))==0&((A>B)+(A>C))==2&((C>B)+(B>A))==1&(A>C>B)==1)
						cout<<"BCA"<<endl;
					}
				}
			}
		}
	}
return 0;
}
/**
 * ??? ???
 * ??? 1000012844
 * ??? ???
 **/




int main()
{
	int i, j;
	int amount[ 3 ];
	int truth[ 3 ];
	char name[ 3 ] = { 'A', 'B', 'C' };
	int smallest;

	

	for ( amount[ A ] = 1; amount[ A ] <= 3; amount[ A ]++ )
	{
		for ( amount[ B ] = 1; amount[ B ] <= 3; amount[ B ]++ )
		{
			for ( amount[ C ] = 1; amount[ C ] <= 3; amount[ C ]++ )
			{
				truth[ A ] = ( amount[ B ] > amount[ A ] ) + ( amount[ C ] == amount[ A ] );
				truth[ B ] = ( amount[ A ] > amount[ B ] ) + ( amount[ A ] > amount[ C ] );
				truth[ C ] = ( amount[ C ] > amount[ B ] ) + ( amount[ B ] > amount[ A ] );

				if ( ( ( ( truth[ A ] > truth[ B ] ) && ( amount[ A ] < amount[ B ] ) )
					|| ( ( truth[ A ] == truth[ B ] ) && ( amount[ A ] == amount[ B ] ) ) ||
					( ( truth[ A ] < truth[ B ] ) && ( amount[ A ] > amount[ B ] ) ) ) &&
					( ( ( truth[ C ] > truth[ B ] ) && ( amount[ C ] < amount[ B ] ) )
					|| ( ( truth[ C ] == truth[ B ] ) && ( amount[ C ] == amount[ B ] ) ) ||
					( ( truth[ C ] < truth[ B ] ) && ( amount[ C ] > amount[ B ] ) ) ) &&
					( ( ( truth[ A ] > truth[ C ] ) && ( amount[ A ] < amount[ C ] ) )
					|| ( ( truth[ A ] == truth[ C ] ) && ( amount[ A ] == amount[ C ] ) ) ||
					( ( truth[ A ] < truth[ C ] ) && ( amount[ A ] > amount[ C ] ) ) ) )
				{
					for ( i = 1; i <= 3; i++ )
					{
						for ( j = 0; j <= 2; j++ )
						{
							if ( amount[ j ] == i )
							{
								cout << name[ j ];
							}
						}
					}
				}

			}
		}
	}
}
/**
* @file homework.cpp
* @author ??
* @date 2010?11?17
* @description
* ??????: ??? 
*/
int main()
{
	int a, b, c, l[3] = {0};                                //????    
	char p[2];                                              //??????
	for (a=0;a<3;a++)
		for (b=0;b<3;b++)
			for (c=0;c<3;c++)                              //?? ??
			{
				if(a != b && b != c && a != c)             //?????
				{
				l[a] = (b > a) + (c == a);             
				l[b] = (a > b) + (a > c);
				l[c] = (c > b) + (b > a);                 //????????
				if (l[0] > l[1] && l[1] > l[2])           //?????       
				{
					p[a] = 'A';
					p[b] = 'B';
					p[c] = 'C';
					cout << p[0] << p[1] << p[2];         //????
				}
				}
			}
			return 0;
}
int main()
{
 int A,B,C;
 char b[3];
 int a[3]={0};
 for(A=0;A<3;A++)
  {
    for(B=0;B<3;B++)
   {
     if(A!=B)
    {      
        C=3-A-B;
        a[0]=(((A>B)+(C==A))==A);
        a[1]=(((A<B)+(A<C))==B);
        a[2]=(((C<B)+(B<A))==C);
        if((a[0]+a[1]+a[2])==3)
        {
         b[A]='A';
         b[B]='B';
         b[C]='C';
         cout<<b[2]<<b[1]<<b[0];
		 break;
        }
     }
     else 
     continue;
   }
 }
 cin.get();cin.get();cin.get();
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)+(a==c);
				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>=b&&b>=c)
						printf("CBA");
					if(b>a&&b>=c)
						printf("CAB");
					if(c>a&&a>=b)
						printf("BAC");
					if(a>=b&&c>b)
						printf("BCA");
					if(b>a&&c>a)
						printf("ACB");
					if(c>b&&b>a)
						printf("ABC");
					break;
				}
			}
		}
	}
	return 0;
}
int main()
{
	int As,Bs,Cs,A,B,C;
	char m[3];
	
	for ( A=0 ; A<3 ; A++ )
		for ( B=0 ; B<3 ; B++ )
			for ( C=0 ; C<3 ; C++ )
			{
				As=( B>A )+( C==A );
	            Bs=( A>B )+( A>C );
	            Cs=( C>B )+( B>A );
				if(As+A==2&&Bs+B==2&&Cs+C==2&&A!=B&&B!=C&&C!=A)
				{
					m[A]='A';
                    m[B]='B';
					m[C]='C';
				    cout<<m[0]<<m[1]<<m[2]<<endl;
				}
			}
	return 0;
}
//**************
//*??????*
//*1000010538  *
//**************
int main()                                                                    //???
{
 int A,B,C,words[3],rank[4],i;
 char person[4]={0};                                                        //?????????
 for(A=1;A<4;A++)                                                           //?????????
 {   for(B=1;B<4;B++)
 {   if(A==B)  continue;                                                  //??????????????
      C=6-A-B;
   words[0]=(B>A)+(C==A);                                                 //?words???????????
   words[1]=(A>B)+(A>C);
   words[2]=(C>B)+(B>A);
   rank[A]=0;                                                             //?A,B,C????????
   rank[B]=1;
   rank[C]=2;                                                               
   if(words[rank[1]]==2&&words[rank[2]]==1&&words[rank[3]]==0)              //??????????????                ??   
    for(i=1;i<=3;i++)
    {   person[i]=rank[i]+65;                                           //?person????A,B,C???
        cout<<person[i];
    }
    }
 }
 return 0;                                                                   //??????????????????
}                                                                                //????
int main()//???
{//?????
	int A=0,B=0,C=0;//??A\B\C???
	int i=0;//??????
	int rank[4]={0},word[4]={0};//??????????????
	for(A;A<4;A++)
	{
		for(B=1;B<4;B++)
		{
			if(A!=B)//????,??????,??
			for(C=1;C<4;C++)
			{
				if(B!=C&&A!=C)
				word[1]=(B>A)+(C==A);
				word[2]=(A>B)+(A>C);
				word[3]=(C>B)+(B>A);//?????????
				rank[A]=1;
				rank[B]=2;
				rank[C]=3;//????
				if(word[rank[3]]<word[rank[2]]&&word[rank[2]]<word[rank[1]])//??????"??????????"
				{
					for(i=1;i<4;i++)
					{
						cout<<(char)(rank[i]+64);
					}//????
				}
			}
		}
	}
	return 0;
}//?????
int main()
{
 int A,B,C;
 int b[3]={0};
 int a[3]={0};
 for(A=0;A<3;A++)
  {
    for(B=0;B<3;B++)
   {
     if(A!=B)
    {      
        C=3-A-B;
        a[0]=(((B<A)+(C==A))==A);
        a[1]=(((A<B)+(A<C))==B);
        a[2]=(((C<B)+(C<A))==C);
        if((a[0]+a[1]+a[2])==3)
        {
         b[A]='A';
         b[B]='B';
         b[C]='C';
         cout<<(char)(b[2])<<(char)(b[1])<<(char)(b[0]);
		 break;
        }
     }
     else 
     continue;
   }
 }
 cin.get();cin.get();cin.get();
return 0;
}
int main()
{
	int person[3],word[3],i,k,rank[3];                                    //??????person[3]??????????????????0 1 2????word[3]???????????????rank[3]???3?????????????????????i??????k????????????????
	for(person[0]=0;person[0]<3;person[0]++)
	{
		for(person[1]=0;person[1]<3;person[1]++)
		{
			if(person[1]!=person[0])
			{
                person[2]=3-person[0]-person[1];                        //????????
				word[0]=(person[1]>person[0])+(person[2]==person[0]);
				word[1]=(person[0]>person[1])+(person[0]>person[2]);
				word[2]=(person[2]>person[1])+(person[1]>person[0]);
				for(i=0;i<3;i++)
				{
					if(person[i]+word[i]==2)
					{
						k=1;
					}
					else
					{
						k=0;
						break;
					}
				}
				if(k==1)
				{
					for(i=0;i<3;i++)
					{
						rank[person[i]]=i;                                       //???????????????????rank[3]
					}
					for(i=0;i<3;i++)
					{
						cout<<(char)(rank[i]+65);                           //????????????
					}
				}
			}
				
		}
	}
	return 0;
}
int main()
{
	int a = 0;
	int b = 0;
	int c = 0;
	char temp[3];

	for( a = 0;a<=2;a++ )
	{
		for( b = 0;b<=2;b++)
	    {
			if(a!=b)
			{
				c=3-a-b;
			
			
				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;

}
/*3??????????????
A??B??????C???????
B??A??????A??C???
C????B????B?A????
?????????????????????
???????????3?????*/

int main()
{
	int A,B,C,a,b,c,x,y,z;
	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);
				x=(a>b)&&(A<B)||(a==b)&&(A==B)||(a<b)&&(A>B);
				y=(a>c)&&(A<C)||(a==c)&&(A==C)||(a<c)&&(A>C);
				z=(c>b)&&(C<B)||(c==b)&&(C==B)||(c<b)&&(C>B);
				if(x+y+z==3)
				{
					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()
{
    char a[5];
    int i,j,k;
    for (i=1; i<=3; i++)
        for (j=1; j<=3; j++)
        {

            if (i!=j)
            {
                k=6-i-j;

                if (3-i==(j>i)+(k==i) && 3-j==(i>j)+(i>k) && 3-k==(k>j)+(j>i))
                {

                    a[i] = 'A';
                    a[j] = 'B';
                    a[k] = 'C';
                    for (i=1; i<=3; i++)
                        printf("%c",a[i]);
                    break;
                }
            }
        }
    return 0;
}
int main()
{
   int a,b,c;
  for(a=0;a<=2;a++)
   for(b=0;b<=2;b++)
    {
      if(a==b)
      continue;
    }
     for(c=0;c<=2;c++)
      {
        if(a==b&&b==c)
         continue;
        else
         
         cout<<"BCA"<<endl;
         break;
       }
 return 0;
}
//??? ??? 20121024 

int main()
{
	int A,B,C;	//???????? 
	for(A=0;A<3;A++)
	for(B=0;B<3;B++)
	for(C=0;C<3;C++)
	if(A!=B&&A!=C&&B!=C)	//?????? 
	{
		int a=(B>A)+(C==A);	//A?? 
		int	b=(A>B)+(A>C);	//B??
		int c=(C>B)+(B>A);	//C?? 
		
		if(a+A==2&&b+B==2&&c+c==2)	//????????????????
		{
			//??????
		for(;;)
		{
				if(A==0)
				{
					cout<<"A";break;	
				}
				
				if(B==0)
				{
					cout<<"B";break;	
				}
				
				if(C==0)
				{
					cout<<"C";break;	
				}	
		}	
		
		for(;;)
		{
				if(A==1)
				{
					cout<<"A";break;	
				}
				
				if(B==1)
				{
					cout<<"B";break;	
				}
				
				if(C==1)
				{
					cout<<"C";break;	
				}	
		}
		
		for(;;)
		{
				if(A==2)
				{
					cout<<"A";break;	
				}
				
				if(B==2)
				{
					cout<<"B";break;	
				}
				
				if(C==2)
				{
					cout<<"C";break;	
				}	
		}	
		return 0;
		} 
	}
}