semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
 	int n, i, j, k, t1[1000] = {0}, t2[1000] = {0}, x[1000], l1, l2;
 	char c1[1000], c2[1000];
 	cin >> n;
 	k = n;
 	while (k != 0)
	{	
		cin.get();
		cin.getline(c1,1000);
		cin.getline(c2,1000);
	 	l1 = strlen(c1);
	 	l2 = strlen(c2);
	 	for (i = 0; i < 1000; i++)
	 		t2[i] = t1[i] = 0;
	 	for (i = 0; i < l1; i++)
	 		t1[i] = c1[l1 - 1 - i] - '0';
	 	for (i = 0; i < l2; i++)
	 		t2[i] = c2[l2 - 1 - i] - '0';
	 	for (i = 0; i < l1; i++)
	 	{
			x[i] = t1[i] - t2[i];
	 		if (x[i] < 	0)
	 		{
				x[i] += 10;
	 			t1[i + 1]--;
			}
		}
		for (i = l1 - 1; i >= 0; i--)
	 		if(x[i] != 0) break;
		for (j = i; j >= 0; j--)
	 		cout << x[j];
	 	cout << '\n';
		k--;
	}	 	
  	
 	
	
	return 0;
}
void main()
{
	char a[50][100],b[50][100];
    int n,i,j,k;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s%s",a[i],b[i]);
	for(i=0;i<n;i++)
	{
		for(j=strlen(a[i])-1,k=strlen(b[i])-1;k>=0;j--,k--)
		{
			a[i][j]=a[i][j]-b[i][k]+'0';
		    if(a[i][j]<'0')
			{
				a[i][j]=a[i][j]+10;
			    a[i][j-1]=a[i][j-1]-1;
			}
		}
	printf("%s\n",a[i]);
	}
}
void main()
{
      int i,j,n,la,lb,aa,bb,cc;
      char a[100][100],b[100][100],c[100][100];
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
            scanf("%s",a[i]);
            scanf("%s",b[i]);
      }
      for(j=0;j<n;j++)
      {
          la=strlen(a[j]);
          lb=strlen(b[j]);
          for(i=0;i<la;i++)
          {
                if((lb-1-i)>=0)
                {
                      aa=a[j][la-1-i]-48;
                      bb=b[j][lb-1-i]-48;
                      if(aa>=bb) 
                       {    cc=aa-bb;  }
                      if(aa<bb)
                       {
                            aa=aa+10;
                            cc=aa-bb;
                            a[j][la-2-i]=a[j][la-2-i]-1;
                       }
                      c[j][la-1-i]=cc+48;
                }
                if((lb-1-i)<0)
                { 
                      c[j][la-1-i]=a[j][la-1-i];
                }
          }
      }
      for(i=0;i<n;i++)
      {
            printf("%s\n",c[i]);
      }
}
int main()
{
	void zuocha(void);
	int k,n;
	cin >> n;
	for (k=1;k<=n;k++)
		zuocha();
	return 0;
}

void zuocha(void)
{
	char str1[100],str2[100];
	int l1,l2;
	cin >> str1 >> str2;
	l1=strlen(str1);
	l2=strlen(str2);

	int num1[100],num2[100],cha[100];
	int i,j;
	
	for (i=0;i<l1;i++)
		num1[l1-1-i]=str1[i]-'0';
	for (i=0;i<l2;i++)
		num2[l2-1-i]=str2[i]-'0';
	for (i=l2;i<l1;i++)
		num2[i]=0;
	
	
	for (i=0;i<l1;i++)
		if (num1[i]>=num2[i])
		{
			cha[i]=num1[i]-num2[i];
		}
		else
		{
			cha[i]=num1[i]+10-num2[i];
			num1[i+1] -=1;
		}
	
	for (i=l1-1;i>=0;i--)
		if (cha[i]!=0)
			break;
	for (j=i;j>=0;j--)
		cout << cha[j];
	cout << endl;
}
void main()
{
	int n,la,lb,j,t;
	char a[100],b[100];
	int c[100];
	scanf("%d",&n);
	int i;	
	for(i=0;i<n;i++)
	{
		t=0;
		for(j=0;j<100;j++)c[j]=0;
		scanf("%s",a);
		scanf("%s",b);
		la=strlen(a);
		lb=strlen(b);
		for(j=0;j<lb;j++)
		{
			c[j]=c[j]+a[la-1-j]-b[lb-1-j];
			if (c[j]<0)
			{
				c[j]=c[j]+10;
				c[j+1]-=1;
			}
		}
		for(j=lb;j<la;j++) c[j]=c[j]+a[la-1-j]-48;
		for(j=99;j>=0;j--)
		{
			if (c[j]!=0) {printf("%d",c[j]);t=1;}
			else if (t!=0) printf("%d",c[j]);
		}
		printf("\n");
	}
}
int main()
{
	char str1[251], str2[251];
	int i = 0, j = 0, len1, len2, a[251], b[251], pos = 0, n, k;
	cin >> n;
//    memset(c,0,sizeof(c));
	for(k = 1;k <= n;k++)
	{
		cin >> str1 >> str2;
		len1 = strlen(str1);
		len2 = strlen(str2);
	    memset(a,0,sizeof(a));
		memset(b,0,sizeof(b));
		j = 0;
		for(i = len1 - 1;i >= 0;i--)
			a[j++] = str1[i] - '0';
		j = 0;
		for(i = len2 - 1;i >= 0;i--)
			b[j++] = str2[i] - '0';
		for(i = 0;i < len1;i++)
		{
			a[i] = a[i] - b[i];
			if(a[i] < 0)
			{
				a[i] = a[i] + 10;
				a[i+1] = a[i+1] - 1;
			}
		}
		for(i = len1 - 1; i >= 0;i--)
			if(a[i] != 0)
			{
				pos = i;
				break;
			}
		for(i = pos;i >= 0;i--)
			cout << a[i];
		cout << endl;
	}
	return 0;
}
//????????//
//??????//
//???1000011029//
//???2010?11?20?//


int main()
{
	int n = 0;                                      //??????????//
	char num1[102];                                 //????????//
	char num2[102];                                 //????????//
	int i = 0;                                      //??????????//
	int t = 0;                                      //???????????????//
	int k = 0;                                      //???????????????//
	int m = 0;                                      //????????//
	int g = 0;                                      //????????// 

	cin >> n;                                       //????//

	for( i = 1;i <= n;i++ )                         //??????//
	{
		cin.ignore();                                   //??\0//
		memset(num1,'0',102);
		memset(num2,'0',102);
		                         
		cin.getline( num1,102 );                    //?????//
		cin.getline( num2,102 );                    //?????//

		t = strlen(num1);                           //???????????//
		k = strlen(num2);                           //???????????//

		t = t - 1;                                  //???????????????//
		g = t;                                      //?????????????//
		for(k = k - 1 ;k >= 0;k-- )                 //??????//
			{
				if( num1[t] >= num2[k] )            //???//
					num1[t] = num1[t] - num2[k] + '0'; 
				else                                //???//
				{
					num1[t] = 10 + num1[t] - num2[k] + '0';
					num1[t - 1]--;
				}
				t--;
			}
		for( m = 0;m <= g;m++ )
			{
				if( num1[m] != 0 )
				{
					for( t = m;t <= g;t++ )
						cout << num1[t];                    //??????//
					cout << endl;
					break;
				}
			}

	}

	return 0;

}
int main()
{
     void usd(char x[100]);
     char a[100],b[100],c[100]={'\0'};
     int i,j,k,p,n;
     scanf("%d",&n);
     for (p=0;p<n;p++)
     {
     scanf("%s",a);
     scanf("%s",b);
     usd(a);
     usd(b);
     k=0;
     for (i=0;b[i]!='\0';i++)
     {
         if (a[i]>=b[i]) c[i]=a[i]-b[i]+48;
         else 
         {
              c[i]=a[i]+58-b[i];
              a[i+1]=a[i+1]-1;
              }   
         k++;
              }
     for (j=k;a[j]!='\0';j++) c[j]=a[j];
     c[j]='\0';
     usd(c);
     printf("%s\n",c);
     }
}
void usd(char x[100])
{
     int r,h,i;
     char w;
     r=strlen(x);
     h=r/2;
     for (i=0;i<h;i++) 
     {
         w=x[i];x[i]=x[r-1-i];x[r-1-i]=w;
         }
     }
void main()
{
	void minus(char x[1000],char y[1000]);
	int i,n;
	char a[1000]={0},b[1000]={0};
	scanf("%d",&n);
	i=0;
	while(i<n)
	{
		scanf("%s",a);
		scanf("%s",b);
		if(a[0]!='\0')
		{
			i=i+1;
			minus(a,b);
			printf("\n");
		}
	}
}
void minus(char x[1000],char y[1000])
{
	int la,lb,i,s,c=0,t=0,ls;
	char str[1000]={0},temp;
	la=strlen(x);
	lb=strlen(y);
	do
	{
		if(lb>0)s=x[la-1]-y[lb-1];
		if(lb<=0)s=x[la-1]-48;
		s=s-c+48;
		if(s<48) 
		{
			s=s+10;
			c=1;
		}
		else c=0;
		str[t]=s;
		t++;
		la--;
		lb--;
	}
	while(la>0);
	ls=strlen(str);
	for(i=ls-1;;i--)
	{
		if(str[i]=='0')str[i]='\0';
		if(str[i]!='0')break;
	}
	ls=strlen(str)-1;
	for(i=0;i<=ls/2;i++)
	{
        temp=str[i];
        str[i]=str[ls-i];
        str[ls-i]=temp;
    }
	printf("%s",str);
}
char input[1000][256],output[1000][256];
int main()
{
	int n,i,j,len;
	scanf("%d",&n);

	char input[1000][256],output[1000][256];
	for(i=0;i<n;i++)
	{
		scanf("%s",input[i]);
	}

	for(i=0;i<n;i++)
	{
		len=strlen(input[i]);
		for(j=0;j<len;j++)
		{
			if(input[i][j]=='A')
				output[i][j]='T';
			if(input[i][j]=='T')
				output[i][j]='A';
			if(input[i][j]=='C')
				output[i][j]='G';
			if(input[i][j]=='G')
				output[i][j]='C';
		}
		output[i][len]='\0';
	}

	for(i=0;i<n;i++)
	{
		printf("%s\n",output[i]);
	}


	return 0;
}
int main(){
char s[256];
int n,i,j;
scanf("%d",&n);getchar();
 for(j=0;j<n;j++){ 
	gets(s);
    for(i=0;i<strlen(s);i++){
         if(s[i]=='T'){printf("A");}
         if(s[i]=='A'){printf("T");}
         if(s[i]=='G'){printf("C");}
         if(s[i]=='C'){printf("G");}
	}
 printf("\n");
 }
return 0;
}
int main(){
 int n,i,j,b[1000];
 char a[1000][1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
   scanf("%s",a[i]);
   b[i]=strlen(a[i]);
 }
 for(i=0;i<n;i++){
   for(j=0;j<strlen(a[i]);j++){
     if(a[i][j]=='A'){
       printf("T");
     }
     if(a[i][j]=='T'){
       printf("A");
     }
     if(a[i][j]=='C'){
       printf("G");
     }
     if(a[i][j]=='G'){
       printf("C");
     }
     if(j==strlen(a[i])-1){
       printf("\n");
     }
   }
 
 }
  return 0;


}
int main()
{
  int n,i,j;
  char s[1000];
  scanf("%d",&n);
  for(j=0;j<n;j++)
   { 
     scanf("%s",s);
     for(i=0;i<(int)strlen(s);i++)
      {
       if(s[i]=='A') s[i]='T';
       else if(s[i]=='T') s[i]='A';
       else if(s[i]=='C') s[i]='G';
       else if(s[i]=='G') s[i]='C';
       }
      printf("%s\n",s);
    }
   return 0;
}
int main(){
    int n,i,j,c=0;
    int a[1000]={0};
    char s1[1000][256];
    char s2[1000][256];
    scanf("%d",&n);
    for(i=0;i<n;i++){
         scanf("%s",s1[i]);
         a[i]=strlen(s1[i]);
         }
    for(i=0;i<n;i++){
         for(j=0;s1[i][j]!='\0';j++){
              if(s1[i][j]=='A'){
                   s2[i][j]='T';
                   }
              else if(s1[i][j]=='G'){
                   s2[i][j]='C';
                   }
              else if(s1[i][j]=='C'){
                   s2[i][j]='G';
                   }
              else{
                   s2[i][j]='A';
                   }
              }
         c=a[i];
         s2[i][c]='\0';
         }
    for(i=0;i<n;i++){
         printf("%s\n",s2[i]);
         }
    return 0;
}
char a[10000][256];
void main()
{
	int n;
	int i,j;
	
	char p[256];
	p['A']='T';
	p['T']='A';
	p['C']='G';
	p['G']='C';
	scanf("%d",&n);
	for(i=0;i<=n;i++)
	{
		gets(a[i]);
		for(j=0;a[i][j]!='\0';j++)
		{
			printf("%c",p[a[i][j]]);
			if(a[i][j+1]=='\0')printf("\n");
		}
	}

	
}
int main(int argc, char* argv[])
{
	int n,i,j,len;
	char jianji[1000][300];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",jianji[i]);
	}
	for (i=0;i<n;i++)
	{
		len=strlen(jianji[i]);
		for (j=0;j<len;j++)
		{
			if (jianji[i][j]=='A')
			{
				jianji[i][j]='T';
			}
			else if (jianji[i][j]=='T')
			{
				jianji[i][j]='A';
			}
			else if (jianji[i][j]=='C')
			{
				jianji[i][j]='G';
			}
			else if (jianji[i][j]=='G')
			{
				jianji[i][j]='C';
			}
		}
	
	}
	for (i=0;i<n;i++)
	{
		printf("%s\n",jianji[i]);
	}
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int i;
	char **oldjianji=(char**)malloc(sizeof(char*)*n);
	for(i=0;i<n;i++){
		oldjianji[i]=(char*)malloc(sizeof(char)*256);
	}	
	int j;
	int *len=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++){
		scanf("%s",oldjianji[i]);
		len[i]=strlen(oldjianji[i]);
	}
	char **jianji=(char**)malloc(sizeof(char*)*n);
	for(i=0;i<n;i++){
		jianji[i]=(char*)malloc(sizeof(char)*len[i]+1);
	}

	for(i=0;i<n;i++){
		for(j=0;j<len[i];j++){
			if(oldjianji[i][j]=='A'){
				jianji[i][j]='T';
			}else if(oldjianji[i][j]=='T'){
				jianji[i][j]='A';	
			}else if(oldjianji[i][j]=='C'){
				jianji[i][j]='G';
			}else if(oldjianji[i][j]=='G'){
				jianji[i][j]='C';
			}
		}
	}
	for(i=0;i<n;i++){
		printf("%s\n",jianji[i]);
	}
free(jianji);
free(oldjianji);
free(len);
return 0;
}
int main()
{
	int n;
	scanf("%d\n",&n);
	int i;
	for(i=0;i<n;i++)
	{
		char m;
		do
		{
			scanf("%c",&m);
			if (m=='A')
			{
				printf("T");
			}
			else if(m=='T')
			{
				printf("A");
			}
			else if(m=='G')
			{
				printf("C");
			}
			else if(m=='C')
			{
				printf("G");
			}
		}while(m!='\n');
		printf("\n");
	}
	return 0;
}
int main(){
    int n,i,j;
	char q[256];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",&q);
		for(j=0;q[j]!='\0';j++){
     		if(q[j]=='A'){
                printf("T");
            }else{
				if(q[j]=='T'){
					printf("A");
				}else{
					if(q[j]=='C'){
						printf("G");
					}else{
						if(q[j]=='G'){
							printf("C");
						}
					}
				}
			}
		}
		printf("\n");
	}
    return 0;
}
int main()
{
	int n,i,j,k,l;
	char a[1000][256],b[1000][256];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
	}
	for(i=0;i<n;i++)
	{
		for(j=0;j<strlen(a[i])+1;j++)
		{
			if(a[i][j]=='A')
			{
				b[i][j]='T';
				continue;
			}
			if(a[i][j]=='T')
			{
				b[i][j]='A';
				continue;
			}
			if(a[i][j]=='C')
			{
				b[i][j]='G';
				continue;
			}
			if(a[i][j]=='G')
			{
				b[i][j]='C';
				continue;
			}
			if(a[i][j]=='\0')
			{
				b[i][j]='\0';
				break;
			}
		}	
		printf("%s",b[i]);
		printf("\n");
	}
	return 0;
}
int main(){
	int n;
	char DNA[1000][256],*p;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%s",DNA[i]);
		for(p=DNA[i];*p!='\0';p++){
			if(*p=='A'){
				*p='T';
			}
			else if(*p=='T'){
				*p='A';
			}
			else if(*p=='G'){
				*p='C';
			}
			else if(*p=='C'){
				*p='G';
			}
		}
	}
	
	for(int j=0;j<n;j++){
		printf("%s\n",DNA[j]);
	}

	return 0;
}
int main()
{
    int n;
    char str[300];
    cin>>n;
    while(n --)
    {
            cin>>str;
            int len = strlen(str);
            for(int i = 0; i < len; i ++)
            {
                    if(str[i]== 'A') str[i] = 'T';
                    else if(str[i]== 'T') str[i] = 'A';
                    else if(str[i]== 'C') str[i] = 'G';
                    else if(str[i]== 'G') str[i] = 'C';
                    cout<<str[i];
            }           
            cout<<endl;
    }
    return 0;
}
int main()
{
	char	words[500];
	int		N;
	cin >> N;
	cin.get();

	for (int i = 0; i < N; i ++)
	{
		cin.getline(words, 500);
		char *p = words;
		while(*p != '\0')
		{
			if(*p == 'A')
			{cout << 'T';}
			else if(*p == 'T')
			{cout << 'A';}
			else if(*p == 'C')
			{cout << 'G';}
			else if(*p == 'G')
			{cout << 'C';}
			p ++;
		}
		cout << endl;
	}
	return 0;
}
int main()
{
	int n, i, j;
	char **dna;
	scanf("%d", &n);
	dna=(char**)malloc(sizeof(char*)*n);
	for (i=0;i<n;i++)
		dna[i]=(char*)malloc(sizeof(char)*255);
	
	for (i=0;i<n;i++)
		scanf("%s",dna[i]);

	char ch;

	for (i=0;i<n;i++)
	{
		for (j=0;(ch=dna[i][j])!=0;j++)
		{
			switch(ch)
			{
			case 'A':
				printf("T");
				break;
			case 'T':
				printf("A");
				break;
			case 'G':
				printf("C");
				break;
			case 'C':
				printf("G");
				break;
			}
		}
		printf("\n");
	}

	for (i=0;i<n;i++)
		free(dna[i]);
	free(dna);
	return 0;
}
struct DNA{
	char zfc[255];
}a[1000];
int main()
{
	int n,i,j,t;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
	gets(a[i].zfc);   
		t=strlen(a[i].zfc);
		for(j=0;j<t;j++){
			if(a[i].zfc[j]=='A')
				a[i].zfc[j]='T';
	        else if(a[i].zfc[j]=='T')
		        a[i].zfc[j]='A';
	        else if(a[i].zfc[j]=='C')
		        a[i].zfc[j]='G';
	        else if(a[i].zfc[j]=='G')
		        a[i].zfc[j]='C';
		}
		puts(a[i].zfc);   
	}
    return 0;
}
char s[1024][1024];
int main()
{

	int n,i,l,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s[i]);
	}
	for(i=0;i<n;i++)
	{
		l=strlen(s[i]);
		for(j=0;j<l;j++)
		{
			if(s[i][j]=='A')
				s[i][j]='T';
			else if(s[i][j]=='T')
				s[i][j]='A';
			else if(s[i][j]=='G')
				s[i][j]='C';
			else if(s[i][j]=='C')
				s[i][j]='G';
		}
	}
	for(i=0;i<n;i++)
	{
		printf("%s\n",s[i]);
	}

	return 0;
}
int main()
{
	int i,j,n;
	char a[256],b[5];
	scanf("%d",&n);
	gets(b);
	for(i=0;i<n;i++)
	{
		gets(a);//gets(a);
		for(j=0;a[j]!='\0';j++)
		{
			switch(a[j])
			{
				case 'A':a[j]='T';break;
				case 'T':a[j]='A';break;
				case 'C':a[j]='G';break;
				case 'G':a[j]='C';break;
			}
		}
		puts(a);
		//printf("%s",a);
	}
	return 0;
}
void main ()
{  int n,i,j,k,a;
char s[500];
  scanf("%d\n",&n);

   for(i=0;i<n;i++)
   { gets(s);
    a=strlen(s);
	for(j=0;j<a;j++)
	{if(s[j]=='A')
	printf("T");
if(s[j]=='T')
	printf("A");
if(s[j]=='C')
	printf("G");
if(s[j]=='G')
	printf("C");
	}
printf("\n");	
   }

}
int main(){
    int i,j,n;                 
	char zfc[256],jg[256];
    scanf("%d", &n);             
    for (i = 0; i < n; i++) {   
        scanf("%s", zfc); 
			for (j = 0; zfc[j]!='\0'; j++){
			 if (zfc[j]=='A'){
				 jg[j]='T';
			 } else if(zfc[j]=='T'){
				 jg[j]='A';
			 } else if(zfc[j]=='C'){
				 jg[j]='G';
			 } else {
				 jg[j]='C';
			 } 
			}
			jg[j]='\0';
			printf("%s\n",jg);
		 }
  
    return 0;
}
int main (){
  int n,i,j,m,k;
  scanf("%d",&n);
  char a[260];
  char b[260];
  for(i=0;i<n;i++)
  {
   scanf("%s",&a);

   for(j=0,k=0;a[j]!='\0';j++,k++)
   {
    if(a[j]=='A'){
     b[k]='T';
    } else if(a[j]=='T'){
      b[k]='A';
    }else  if(a[j]=='G'){
      b[k]='C';
    }  else if(a[j]=='C'){
      b[k]='G';
    }
   }
   b[k]='\0';
   printf("%s\n",b);
  }
       return 0;
}
int main(){
 int n;
char m[10000][256];
scanf("%d",&n);
for (int j=0;j<n;j++){ 
        scanf("%s",m[j]); }
for(int j=0;j<n;j++){                       
        for(int i=0;i<strlen(m[j]);i++){
        if(m[j][i]=='A')m[j][i]='T';
        else if(m[j][i]=='T')m[j][i]='A';
        else if(m[j][i]=='G')m[j][i]='C';
        else if(m[j][i]=='C')m[j][i]='G';
        printf("%c",m[j][i]);}
        printf("\n");}
   

return 0;
}
int main ()
{
    int m,n,i,j;
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
    char a[MAX+1],b[MAX+1];
    scanf("%s",a);
        for(j=0;a[j];j++)
        {
          switch(a[j])
          {
                case'A':b[j]='T';
                break;
                case'T':b[j]='A';
                break;
                case'G':b[j]='C';
                break;
                case'C':b[j]='G';
                break;
                default:b[j]=a[j];
                break;
           }   
         }
      b[j]=a[j];
      printf("%s\n", b);
    }
	return 0;
}
int main (){
	char a[260],b[260];
	int n,i,t;
	scanf("%d",&n);
	for(t=0;t<260;t++){
		b[t]='\0';
	}
	for(i=0;i<n;i++){
		scanf("%s",a);
		for(t=0;a[t]!='\0';t++){
			if(a[t]=='A'){
				b[t]='T';
			}
			if(a[t]=='C'){
				b[t]='G';
			}
			if(a[t]=='T'){
				b[t]='A';
			}
			if(a[t]=='G'){
				b[t]='C';
			}
		}
		b[t]='\0';
		printf("%s\n",b);
	}
		return 0;
}
int main(){
int n;
char c[300];
scanf("%d",&n);
getchar();
for (int j=0;j<n;j++){
   gets(c);
   for (int i=0;i<strlen(c);i++){
	 if (c[i]=='A') {
      printf("T");
     }
     if (c[i]=='T') {
      printf("A");
     }
     if (c[i]=='G') {
      printf("C");
     }
     if (c[i]=='C') {
      printf("G");
     }
    if (i==(strlen(c)-1)){
      printf("\n");
	 }
	}
}
return 0;
}
void main()
{
	char f(char x);
	int n, i, j;
	char s[256];
	scanf("%d\n", &n);
	for(i=0; i<n; i++)
	{
		gets(s);
		for(j=0; s[j]!='\0'; j++)
			s[j]=f(s[j]);
		s[j]='\0';
		puts(s);
	}
}
char f(char x)
{
	switch(x)
	{
	case 'A': return 'T'; break;
	case 'T': return 'A'; break;
	case 'C': return 'G'; break;
	case 'G': return 'C'; break;
	}
}
int main(){
	int n,len;
	scanf("%d",&n);
	char dna[256];
	char hubu[256];
	for(int i=0;i<n;i++){
		scanf("%s",dna);
		len=strlen(dna);
		for(int r=0;r<=len;r++){
			if(dna[r]-'A'==0){
				hubu[r]='T';
			}else if(dna[r]-'T'==0){
				hubu[r]='A';
			}else if(dna[r]-'C'==0){
				hubu[r]='G';
			}else if(dna[r]-'G'==0){
				hubu[r]='C';
			}else{
				hubu[r]=0;
			}
		}
		printf("%s\n",hubu);
	}
    return 0;
}
int main()
{
   int n,len,i,j;
   char str[256];
   cin>>n;
   for(i=0;i<n;i++)
   {
      cin>>str;
	  len=strlen(str);
	  for(j=0;j<len;j++)
	  {
	     switch(str[j])
		 {
		    case 'A': cout<<'T';break;
            case 'T': cout<<'A';break;
			case 'C': cout<<'G';break;
			case 'G': cout<<'C';break;
		 }
	  }
	  cout<<endl;
   }
   return 0;
}
int main(){
	int n,i,j;
	char zf[300],pd[300];
	scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%s",zf);
	int l=strlen(zf);
	for(j=0;j<l;j++){
		if(zf[j]=='A'){
			pd[j]='T';
			continue;}
		if(zf[j]=='T'){
		pd[j]='A';
continue;}
		if(zf[j]=='C'){
			pd[j]='G';
			continue;}
		if(zf[j]=='G'){
			pd[j]='C';
			continue;}}
	pd[strlen(zf)]='\0';
		printf("%s\n",pd);}

return 0;
}
int main()
{
 	int n,i,k,l;
 	char ml[256],zl[256];
 	scanf("%d",&n);
 	for(i=1;i<=n+1;i++){
		gets(ml);
		l=strlen(ml);
		for(k=0;k<l;k++){
			if(ml[k]=='A') zl[k]='T';
			else if(ml[k]=='G') zl[k]='C';
			else if(ml[k]=='C') zl[k]='G';
			else if(ml[k]=='T') zl[k]='A';
			}
		for(k=0;k<l;k++){
			if(k<l-1) printf("%c",zl[k]);
			else printf("%c\n",zl[k]);
			}
		}
 	
    return 0;
}
int main(){
    int n,i,j;
    char s[10000][260];
    scanf("%d",&n);
    for(i=1;i<=n;i++){
      scanf("%s",s[i]);
                     }
    for(i=1;i<=n;i++){
      for(j=0;s[i][j]!='\0';j++){
        if(s[i][j]=='A'){
           s[i][j]='T';
                      }
        else if(s[i][j]=='C'){
           s[i][j]='G';
                          }
        else if(s[i][j]=='G'){
           s[i][j]='C';
                          }                
        else if(s[i][j]=='T'){
           s[i][j]='A';
                          }             
                            }
         printf("%s\n",s[i]);  
                     }   
      return 0;
    }
int main(){
	char zfc[256],*ps;
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		char e[256]={0};
	    scanf("%s",zfc);
		for(ps=zfc;*ps!='\0';ps++){
			if(*ps=='A'){
				strcat(e,"T");
			}else if(*ps=='T'){
				strcat(e,"A");
			}else if(*ps=='G'){
                strcat(e,"C");
			}else{
				strcat(e,"G");
			}
		}
	
		printf("%s\n",e);
	}
return 0;
}
int main(){
char s[MAX+1];
int i,j,n,l;
char A,T,G,C;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%s",s);
l=strlen(s);
for(j=0;j<l;j++)
{
if (s[j]=='T')     printf("A");
if (s[j]=='A')     printf("T");
if (s[j]=='G')     printf("C");
if (s[j]=='C')     printf("G");
}
printf("\n");
}
return 0;
}
int main(){
    int n,i,j;
    scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		char DNA0[256],DNA1[256];
		scanf("%s",DNA0);
		for(j=0;j<strlen(DNA0);j++)
		{
			if(DNA0[j]=='A')
				DNA1[j]='T';
			if(DNA0[j]=='T')
				DNA1[j]='A';
			if(DNA0[j]=='C')
				DNA1[j]='G';
			if(DNA0[j]=='G')
				DNA1[j]='C';
		}
		DNA1[strlen(DNA0)]='\0';
		printf("%s\n",DNA1);
	}
	return 0;
}
int main()
{
    int n;
	scanf("%d",&n);
	int i;
	char a[2000];
	for(i=0;i<=n;i++)
	{
       gets(a);
int j;
	   for(j=0;j<strlen(a);j++)
		{
			switch(a[j])
			{
			case 'A':
				a[j]='T';
				break;
			case 'T':
				a[j]='A';
				break;
				case 'C':
				a[j]='G';
				break;
				case 'G':
				a[j]='C';
				break;
			}
		}
		int k;
		for(k=0;k<strlen(a);k++)
		{
			printf("%c",a[k]);
		}
		printf("\n");
	}
	return 0;
}
int main(){
    int n;
    scanf("%d",&n);
    char sr[n][256];
    for(int i=0;i<n;i++){
        scanf("%s",sr[i]);
    }
    for(int i=0;i<n;i++){
        int m=strlen(sr[i]);
        for(int j=0;j<m;j++){
            if(sr[i][j]=='T'){
                printf("A");
            }
            if(sr[i][j]=='A'){
                printf("T");
            }
            if(sr[i][j]=='C'){
                printf("G");
            }
            if(sr[i][j]=='G'){
                printf("C");
            }
            if(j==m-1){
                printf("\n");
            }
        }
    }
    return 0;
}
int main()
{
	int n,i=0,k=0;
	char jianji[1000][1000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",jianji[i]);
	}
	for(i=0;i<n;i++)
	{
		for(k=0;k<strlen(jianji[i]);k++)
		{
			switch(jianji[i][k]){
			case 'T':
				jianji[i][k]='A';break;
			case 'A':
				jianji[i][k]='T';break;
			case 'G':
				jianji[i][k]='C';break;
			case 'C':
				jianji[i][k]='G';break;
			default:
				jianji[i][k]=0;break;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		printf("%s\n",jianji[i]);
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int i,a;
	for(i=0;i<n;i++)
	{
		char zfc[256];
		scanf("%s",zfc);
        a=strlen(zfc);
		int j;
		for(j=0;j<a-1;j++)
		{
			if(zfc[j]=='A')  printf("%c",'T'); 
			
            else if(zfc[j]=='T') printf("%c",'A');
            
            else if(zfc[j]=='G') printf("%c",'C');
			
            else if(zfc[j]=='C') printf("%c",'G');
			
		}
            if(zfc[j]=='A') printf("%c\n",'T');
            else if(zfc[j]=='T') printf("%c\n",'A');
            else if(zfc[j]=='G') printf("%c\n",'C');
            else if(zfc[j]=='C') printf("%c\n",'G');
	}
	return 0;
}
int main(){
    int n,i,j;
	char t[256];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",t);
		for(j=0;t[j]!='\0';j++){
			if(t[j]=='A') t[j]='T';
			else if(t[j]=='T') t[j]='A';
			else if(t[j]=='C') t[j]='G';
			else if(t[j]=='G') t[j]='C';
		}
		puts(t);
	}
	return 0;
}