semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int t, i, j, l, k, m;
	char s[100000], a[26];
	cin >> t;
	for(i = 0 ; i < t ; i++)
	{
		for(j = 0; j < 26 ; j++)
		a[j] = '1';
		cin >> s;
		m = strlen(s);
		a[0] = s[0];
		for(j = 1 ;j < m;j++)
		{
			k = 0;
			do
			{
				if(a[k] == '1')
					break;
				if(a[k] != s[j])
					k ++;
				else break;
			}while(1);
			if(a[k] == '1')
				a[k] = s[j];
			else
			{
				for(l = k; l < 26 ; l ++)
					a[l] = a[l + 1];
			}
		}
		if(a[0] == '1')
			cout << "no" << endl;
		else
			cout << a[0] << endl;
	}
	return 0;
}
char rec[200];
int main()
{
    char s[10000];
    int i,j,l,t,k,n;
    scanf("%d\n",&n);
    for(j=0;j<n;j++)
    {
     scanf("%s",s);
     for(i=0;i<200;i++)
      rec[i]=0;
     l=strlen(s);
     for(i=0;i<l;i++)
      rec[s[i]]++;
     t=0;
     for(i=0;i<l;i++)
      if(rec[s[i]]==1)
      {
        printf("%c\n",s[i]);
        t=1;
        break;
      }
     if(t==0) printf("no\n");
    }
    scanf("%d",&i);
    return 0;
}
void find(char c[])
{
	int i,a[26]={0};
	for (i=0;c[i];i++)
		a[c[i]-'a']++;
	for (i=0;c[i];i++)
		if (a[c[i]-'a']==1)
		{
			printf ("%c\n",c[i]);
			return;
		}
	printf ("no\n");
}

main()
{
	int t,i;
	char c[100000];
	scanf ("%d\n",&t);
	for (i=0;i<t;i++)
	{
		gets (c);
		find (c);
	}
}
int main()
{
	int n,i,j;
	scanf("%d",&n);
	while(n--)
	{
		int len,flag=1;
		char c[100001];
		scanf("%s",c);
		len=strlen(c);
		for(i=0;i<len;i++)
		{
			int isbreak=0;
			for(j=0;j<i;j++)
			{
				if(c[j]==c[i])
				{
					isbreak=1;
					break;
				}
			}
			if(isbreak)continue;
			for(j=i+1;j<len;j++)
			{
				if(c[j]==c[i])
				{
					isbreak=1;
					break;
				}
			}
			if(isbreak)continue;
			printf("%c",c[i]);
			flag=0;
			break;
		}
		if(flag)
			printf("no");
		if(n)
			printf("\n");
	}
	return 0;
}
int main(){
	int t,i,j,len,num,tag;
	char k;
	char str[100000];
	scanf("%d",&t);
	getchar();
	for(i=0;i<t;i++){
		num=1;
		tag=1;
		gets(str);
		len=strlen(str);
		for(j=0;j<len;j++){
			for(k=j+1;k<len;k++){
				if(str[j]==str[k]&&str[j]>='a'&&str[j]<='z'){
					num=num+1;
					str[k]='A';
				}
			}
			if(num==1&&str[j]>='a'&&str[j]<='z'){
				printf("%c\n",str[j]);
				tag=0;
				break;
			}
			else{
				num=1;
			}
		}
		if(tag==1) printf("no\n");
	}
	return 0;
}
void main()
{
	int n;
	char str[100000];
	int i,j,k=0;
	int flag=0;
	int len=0;
	scanf("%d",&n);
	gets(str);
	for(i=0;i<n;i++)
	{
		k=0;
		len=0;
		j=0;
		flag=0;
		gets(str);
		len=strlen(str);
		for(j=0;j<len;j++,flag=0)
		{	
			for(k=0;k<len;k++)
			{
				if(str[k]==str[j])
				{
					flag++;
				}
			}
			if(flag==1)
			{
				printf("%c\n",str[j]);
				break;
			}
			else
			{
				if(j==len-1)
				{
					printf("no\n");
					break;
				}
			}
		}
	}
}
int main()
{
	int n,k;
	scanf("%d",&n);
	for(k=0;k<=n;k++)
	{
		char zifuchuan[10000];
		gets(zifuchuan);
		int len;
		len=strlen(zifuchuan);
		int i,j,m=0,p=0,a,b;
		for(i=0;i<len;i++)
		{
			for(j=0;j<len;j++)
			{
				a=(int)zifuchuan[i];
				b=(int)zifuchuan[j];
				if(a==b)
					m++;
			}
			if(m==1)
			{
				printf("%c\n",zifuchuan[i]);
				break;
			}
			else if(m!=1)
				p++;
			m=0;
		}
		if(p==len&&p!=0)
		{
			printf("no\n");
		}
	}
		
	return 0;
	
}
int main()
{
	int n,i,j,k,s,m,b;
	char a[100000],c[10];
	scanf("%d",&n);
	gets(c);
	for(i=0;i<n;i++)
	{
		b=0;		
		gets(a);
		for(j=0;j<strlen(a);j++)
		{	
			s=0;
			for(k=0;k<strlen(a);k++)
			{
				if(a[j]==a[k])
					s++;
			}
		
			if(s==1)
			{
				b=1;
				m=j;
				break;
			}
		
		}
		if(b==0)
			printf("no\n");
		else
			printf("%c\n",a[m]);
		
	}
	return 0;
}
/*???????????
  ???
  1000010098*/
int main ()
{
	char a[100001];
	short b[100000];
	int i, t, j, k, len; 
	cin >> t;
	for (k = 1; k <= t; k ++)
	{
		cin >> a;
		len = strlen(a);  //??????
		memset(b,0,200000);
		for(i = 0; i < len; i ++)
		{
			if(b[i] == -1) //???????????
				continue;
			for(j = i + 1; j < len; j ++)
			{
				if(b[j] == -1)
					continue;
				if(a[j] == a[i])
				{
					b[j] --;    //??????
					b[i] ++;    //??????????
				}
			}
			if(b[i] == 0)  //???????
			{
				cout << a[i] << endl;
				break;
			}
		}
		if (i == len)//??????????
			cout << "no" << endl;
	}
	return 0;
}
//****************************************************************
// ???wusy                                                    *
// ???11,17                                                   *
// ???????????                                        *
//****************************************************************
char a[100][100001];
int main()
{
	int t, i, j, flag = 0, count[26], p;
	cin >> t;
	cin.get();
	for(i = 0; i <= t-1; i++)
		cin.getline(a[i],100001);

	for(i = 0; i <= t-1; i++)
	{
		memset(count,0,sizeof(count));
		flag = 0;

		for(j = 0; a[i][j] != '\0'; j++)
		{
			p = a[i][j] - 'a';
			count[p]++;
		}

		for(j = 0; j <= 25; j++)
		{
			if(count[a[i][j] - 'a'] == 1)
			{
				cout << a[i][j] << endl;
				flag = 1;
				break;
			}
		}

		if(flag == 0)
			cout << "no" << endl;
	}
	return 0;
}
main()
{
char s[100000];
int t0,t;
scanf("%d",&t);
for(t0=1;t0<=t;t0++)
{
  int i,j1,j2,k,m=0;
  scanf("%s",s);
  k=strlen(s);
  int a[k];
  memset(a,0,4*k);
  for(j1=0;j1<k;j1++)
      {         
        for(j2=0;j2<k;j2++)
          {  
            if(s[j2]==s[j1])   a[j1]++;   
          } 
      }

  for(i=0;i<k;i++)
      {
        if(a[i]==1) 
          {  m++;  break;  }   
      }
      
  if(m==0)  printf("no\n"); 
  else      printf("%c\n",s[i]); 
}     
}
int main()
{
	int a=0,b,v,d,n,max,nn,mm=0,ii,c,e,f,i,j,t[100];
	char cc;
	scanf("%d",&nn);
	scanf("%c",&cc);
	for(ii=1;ii<=nn;ii++){
		int y[1000]={0};
char x[1000];
	gets(x);
	e=strlen(x);
		for(i=0;i<=e-1;i++){
			for(j=0;j<=e-1;j++){
				if(x[i]==x[j])y[i]++;}
			if(y[i]==1){printf("%c\n",x[i]);
			break;
			}
		}
		if(i==e)printf("no\n");
	
	}	
}
main()
{
      int t;
      scanf("%d",&t);
      char a[100000];
      int b[100000];
      for(int i=0;i<t;i++)
      {
              for(int x=0;x<100000;x++)
              {
                      a[x]=0;
                      b[x]=0;
              }
              scanf("%s",a);
              int len=strlen(a);
              int j;
              for(j=0;j<len;j++)
              {
                      for(int k=j+1;k<len;k++)
                      { 
                              if(a[j]==a[k])
                              {
                                       b[j]++;
                                       b[k]++;
                              }
                      }
                      if(b[j]==0)
                      {
                                         printf("%c\n",a[j]);
                                         break;  
                      }
              }
              if(j==len)
              printf("no\n");
      }
}
void main()
{
	char a[1000];
	int i,t,length,b[26],flag,count=0;
	scanf("%d",&t);
	while(t--)
	{
	scanf("%s",a);
	length=strlen(a);
	for(i=0;i<26;i++)
	{
		b[i]=0;
	}
	for(i=0;i<length;i++)
	{
		flag=a[i]-'a';
		b[flag]++;
	}
	for(i=0;i<length;i++)
	{
		if(b[a[i]-'a']==1)
		{
			printf("%c\n",a[i]);
			count=1;
			break;
		}
	}
	if(count==0)
		printf("no\n");
	count=0;
	}
}
int main(){
	int n, count[26];
	char str[100001];

	cin >> n;
	while (n--){
		cin >> str;
		memset(count, 0, sizeof(count));
		int i;
		for (i = 0; str[i] != '\0'; i++)
			count[str[i] - 'a']++;

		for (i = 0; str[i] != '\0'; i++)
			if (count[str[i] - 'a'] == 1){
				cout << str[i] << endl;
				break;
			}
		if (str[i] == '\0')
			cout << "no" << endl;
	}
	return 0;
}
main()
{
      int i,j,k,m,n,t;
      int a[26]={0};
      char s[1000];
      scanf("%d\n",&n);
      for(i=1;i<=n;i++)
      {
                       for(t=0;t<26;t++)
                       a[t]=0;
                       k=0;
                       gets(s);
                       m=strlen(s);
                       for(j=0;j<m;j++)
                       a[s[j]-'a']++;
                       for(j=0;j<m;j++)
                       {
                                       if(a[s[j]-'a']==1)
                        {printf("%c\n",s[j]);k=1;break;}
                                                       }
                       if(k==0)
                       printf("no\n");  
                       }}
int test(char A,char B);
int main(){
	int n,i,a,b,len,TEST,CHECK=1,SUM=0;
	char input[NO];
	char *pinput=input;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",input);
		len=strlen(input);
		CHECK=1;
		for(a=0;a<len&&CHECK;a++){
			SUM=0;
			for(b=0;b<len;b++){
				if(a!=b){
					TEST=test(*(pinput+a),*(pinput+b));
					SUM+=TEST;
				}
			}
			if(SUM==0){
				printf("%c\n",*(pinput+a));
				CHECK=0;
			}
		}
		if(CHECK==1){
			printf("no\n");
		}
	}
	return 0;
}
int test(char A,char B){
	if(A==B)
		return 1;
	if(A!=B)
		return 0;
}
// ??????.cpp : Defines the entry point for the console application.
//


int main()
{
	
	int i = 0;
	int t = 0;
	int m = 0;
	int len = 0;

	cin >> t;
	cin.ignore();

	for( ;t > 0;t-- )
	{
		int num[26] = {0};
		char zifu[100001];
		int sum = 0;
		cin.getline(zifu,100001);

		len = strlen(zifu);

		for( i = 0;i <= len - 1;i++ )
		{
			num[zifu[i] - 'a']++;
		}

		for( i = 0;i <= len - 1;i++ )
		{
			if( num[zifu[i] - 'a'] == 1 )
			{
				sum = 1;
				break;
			}
		}

		if( sum == 1 )
			cout << zifu[i] << endl;
		else 
			cout << "no" << endl;

	}

	return 0;
}
int main(){
    int t,num;
    char s[100][1000],a[4];
    char *p,*q1,*q2;
    gets(a);
    t=atoi(a);
    for(p=*s;p<*(s+t);p+=1000)
        gets(p);
    for(p=*s;p<*(s+t);p+=1000){
        for(q1=p;q1<p+strlen(p);q1++){
            num=0;
            for(q2=p;q2<p+strlen(p);q2++){
                if(*q1==*q2)
                    num++;
                if(num==2)
                    break;
            }
            if(q2==p+strlen(p)){
                printf("%c\n",*q1);
                break;
            }
        }
        if(q1==p+strlen(p))
            printf("no\n");
    }
    return 0;
}
int main(){
	int i,j,k,n=1,t,kong,cs[100],d;
	char zfc[1000],zf[1000];
	scanf("%d",&t);
	for(i=0;i<t;i++){
		scanf("%s",&zfc);
		zf[0]=zfc[0];
		cs[0]=1;
		for(j=1;j<100;j++){
			cs[j]=0;
		}
		for(j=1;j<strlen(zfc);j++){
			kong=0;
			for(k=0;k<n;k++){
				if(zfc[j]==zf[k]){
					kong=1;
					cs[k]=cs[k]+1;
					break;
				}
			}
			if(kong==0){
				zf[n]=zfc[j];
				cs[n]=cs[n]+1;
				n=n+1;
                d=n;
			}
		}
         kong=0;
		for(j=0;j<d;j++){
			
			if(cs[j]==1){
				printf("%c\n",zf[j]);
				kong=1;
				break;
			}
			
				
			
		}
	
		if(kong==0){
			printf("no\n");
		}
		
	}
		
return 0;
    }
void main()
{
	int t,i,j,s=0,sum=0,m,n;
	char a[100]={0,0},b[100000]={0,0};
	scanf("%d",&t);
	
	for(i=0;i<t;i++)
	{scanf("%s",b);
	sum=0;
	for (j=0;b[j]!='\0';j++)
	{   s=0;
	{for (m=0;(s!=2)&&(b[m]!='\0');m++)
		if ((b[j])==(b[m])) s=s+1;}
	if (s==1) {a[i]=b[j];sum=sum+1;break;}
}	
	if (sum==0) a[i]='$';
	}

	for (i=0;i<strlen(a);i++)
	{if(a[i]=='$') printf("no\n");else printf("%c\n",a[i]);}
}
//*******************************
//???????????????
//?????
//???2011-11-7
//*******************************
int main()
{
	char a[100000];              //???????
	char b[27] = {"abcdefghijklmnopqrstuvwxyz"};        //???????????
	int c[100000];                        //???????????????
	int i, j, x, y = 0, min, t, k, first = 1, count = 0;           //??????
	cin >> t;                     //??????
	for(k = 1;k <= t;k++)              
	{
		for(i = 0;i <= 99999;i++)            //?c?????
			c[i] = 100000;
		y = 0;               //?y???
		if(first == 1)          //????????????
		{ 
			cin.get();
			first = 0;
		}
		cin.getline(a, 100000);            //?????
		for(i = 0;b[i] != '\0';i++)            
		{
			count = 0;               //?????????
			for(j = 0;a[j] != '\0';j++)
			{
				if(b[i] == a[j])           //??????????26??????????????????
				{
					x = j;              //?????????????
					count++;        //????????
				}
			}
			if(count == 1)          //???????????????c???
			{
				c[y] = x;
				y++;
			}
		}
		if(c[0] == 100000)           //?c[0] = 100?????????????
		{
			cout << "no" << endl;
		}
		else
		{
			min = c[0];                //?c[0]????
			for(i = 1;i <= 99999;i++)      //?????
			{
				if(min > c[i])
				{
					min = c[i];         
				}
			}                          
			cout << a[min] << endl;      //??????a????????
		}
	}
	return 0;
}
int main()
{
		char a[100][10000];
		int t,i,j,k,n;
		cin>>t;
		cin.get();
		for(i=0;i<t;i++)cin>>a[i];
			for(i=0;i<t;i++)
			{
				for(j=0;a[i][j]!='\0';j++)
				{
					n=0;
					for(k=0;a[i][k]!='\0';k++)
                    {
						if(a[i][j]==a[i][k])n++;
					}
				if(n==1)
				{
					cout<<a[i][j]<<endl;
				break;
                }
			}
		if(n>1)cout<<"no"<<endl;
			}
		return 0;
}
int main()
{
	int n,i,j,k,ls,num,z[100];
	char s[200],x[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s);
		ls=strlen(s);
		for(j=0;j<ls-1;j++)
		{
			num=0;
			for(k=j+1;k<ls;k++)
				if(s[k]==s[j] && s[j]!='!')
				{
					s[k]='!';
					num++;
				}
				if(num==0 && s[j]!='!')break;
		}
           if(num!=0)z[i]=1;
		   else{
	         x[i]=s[j];
			 z[i]=0;
		   }
	}
	for(i=0;i<n;i++)
	if(z[i]!=1)printf("%c\n",x[i]);
	else printf("no\n");
        return 0;
}
int main()
{
	char ch[100][10000]={0};
	
	char (*p)[10000];
	int n;
	scanf("%d\n",&n);
	for(p=ch;p<=ch+n-1;p++)
	{
		gets(*p);
	}
	char *point;
	int *p_num,count;
	for(p=ch;p<=ch+n-1;p++)
	{
        int num[26]={0};
		
		for(point=*p;*point!='\0';point++)
		{
			if(*point>='a'&&*point<='z')
			{
				int temp=*point-'a';
				p_num=num+temp;
				(*p_num)++;
			}
            else if(*point>='A'&&*point<='Z')
			{
				int temp=*point-'A';
				p_num=num+temp;
				(*p_num)++;
			}
		}
        for(point=*p;*point!='\0';point++)
		{  count=0;
           int temp=*point-'a';
           p_num=num+temp;
           if(*p_num==1){printf("%c",'a'+p_num-num);count++;break;}
		}if(count==0)printf("no");
		   
		   
		printf("\n");
	}
}
int main()
{
	int n,i,j,k,len,time=0;
	char str[100000],*p=str;

	int cs[100000]={0};

	scanf("%d",&n);

	for(i=0;i<n;i++){
		scanf("%s",str);

		len=strlen(str);

		for(j=0;j<len;j++){
			for(k=0;k<len;k++){
				if(*(p+k)==*(p+j))
					cs[j]++;
			}
		}

		for(j=0;j<len;j++){
			if(cs[j]==1){
				printf("%c\n",*(p+j));
				break;
			}
		}

		time=0;

		for(j=0;j<len;j++){
			if(cs[j]>1)
				time++;
		}

		if(time==len)
			printf("no\n");

		for(j=0;j<len;j++)
			cs[j]=0;
		
	}

	return 0;
}
int main()
{
	char a[100001];
	int b[300]={0};
	int n,j,m,i,p;
	scanf("%d",&m);
	for (j=1;j<=m;j++)
	{
		for (i=1;i<=300;i++)
			b[i]=0;
		scanf("%s",a);
	    n=strlen(a);
	for (i=0;i<n;i++)
	{
		p=a[i];
		b[p]++;
	}
	i=0;
	while ((b[a[i]]!=1) && (i<n))
		i++;
	if (i<n)
		printf("%c\n",a[i]);
	else
		printf("no\n");
	}
	return 0;
}
int main()
{
	char ch[10000];
	int i, j, k, t, m, nlen;
	cin >> t;
	for (i = 0; i < t; i++)
	{
		int flag = 0, l = 0;
		memset(ch, 0, sizeof(ch));
		int a[26] = {0};
		int b[26] = {0};
		cin >> ch;
		nlen = strlen(ch);
		for (j = 0; j < nlen; j++)
			a[ch[j] - 'a']++;
		for (k = nlen - 1; k >= 0; k--)
		{
			if (a[ch[k] - 'a'] == 1)
			{
				m = k;
				flag = 1;
			}
		}
		if (flag == 0)
			cout << "no";
		else
		{
			cout << ch[m];
			cout << endl;
		}
	}
	return 0;
}
int main(){
	int t,i,j,k,p,m;
	char s[LEN];
	scanf("%d",&t);
	for(i=0;i<t;i++){
		m=0;
		scanf("%s",s);
		for(j=0;s[j];j++){
			p=0;
			if(s[j]!='A'){
				for(k=j+1;s[k];k++){
					if(s[k]==s[j]){
						p++;
						s[k]='A';
					}
				}
				if(p==0){
					printf("%c\n",s[j]);
					m=1;
					break;
				}
			}
		}
		if(m==0){
			printf("no\n");
		}
	}
	return 0;
}
main()
{
	int e,n,x,i,j;
	char s[100002];
	scanf("%d",&n);
	for(e=0;e<n;e++)
	{
		scanf("%s",s);
		x=strlen(s);
		int *b=(int *)malloc(x*sizeof(int));
		for(i=0;i<x;i++)
		{
			b[i]=0;
			for(j=0;j<x;j++)
			{
				if(s[j]==s[i])
				{
					b[i]++;
				}
			}
		}
		for(i=0;i<x;i++)
		{
			if(b[i]==1)
			{
				printf("%c\n",s[i]);
				break;
			}
			if(b[i]!=1&&i==(x-1))
			{
				printf("no\n");
			}
		}
	}
}
main()
{
      int t,i,j,k[26],x;
      char c[10000];
      scanf("%d",&t);
      for(i=0;i<t;i++)
      {
        scanf("%s",c);
        memset(k,0,sizeof(k));
        x=strlen(c);
        for(j=0;j<x;j++){
                         k[c[j]-'a']++;
                         }
        for(j=0;j<x;j++)
        {
          if(k[c[j]-'a']==1)
          {printf("%c\n",c[j]);
          break;}
          if(j==x-1)
          printf("no\n");
          }
      }

}
int main(){
    int i,j,n,m,k;
    scanf("%d",&n);
    char d[10];
    gets(d);
    char a[n][1000];
    for(i=0;i<n;i++)gets(a[i]);
    for(i=0;i<n;i++){
       int c,d=0;
       c=strlen(a[i]);
       int b[c];for(m=0;m<c;m++)b[m]=0;
       for(j=0;j<c;j++){
          for(k=0;k<c;k++){
             if(a[i][j]==a[i][k])b[j]++;
             }
          if(b[j]==1){
            printf("%c\n",a[i][j]);
            break;
            }
          }
       for(m=0;m<c;m++){
          if(b[m]==1)d=1;
          }
       if(d==0)printf("no\n");
       }
    scanf("%d",n);
    return 0;
}
//**************************************
//*  ????????????          *
//*  ??????                      *
//*  ?????2011?10?31?          *
//**************************************


int main()
{
	int t, i, j, k, n, p, q;
	char str[100000];
	cin >> t;//t?????????
	for(i = 1; i <= t; i ++)
	{
		cin >> str;//?????
		n = strlen(str);//n????????
		q = 0;//q????????????
		for(j = 0; j < n; j ++)
		{
			p = 0;//p?????????????
			for(k = 0; k < n; k ++)
			{
				if(k != j)//???????????
				{
					if(str[j] == str[k])//????????
					{
						p = 1;//p???1
						q = q + p;//????q?
						break;//??????
					}
				}
			}
			if(p == 0)//???????????
			{
				cout << str[j] << endl;//???????
				break;//????
			}
		}
		if(q == n)//?????????????????
			cout << "no" << endl;//??no
	}
	return 0;
}
int main()
{
	int t, i, j, k, wordnum[26];
	char inword, word[26];
	cin >> t;
	cin.get();
	for (i = 0; i < t; i++)
	{
		for (k = 0; k < 26; k++)
			wordnum[k] = 0;
		inword = cin.get();
		j = k = 0;
		while(inword != '\n')
		{
			for (k = 0; k < j; k++)
				if (inword == word[k])
					break;
			if (k == j)
			{
				word[k] = inword;
				wordnum[k]++;
				j++;
			}
			else
				wordnum[k]++;
			inword = cin.get();
		}
		for (k = 0; k < j; k++)
			if (wordnum[k] == 1)
			{
				cout << word[k] << endl;
				break;
			}
		if (k == j)
			cout << "no" << endl;
	}
	return 0;
}
void main()
{
	int a[26],flag1,flag2,len;
	int t,i,j,k;
	char s[100],c[26];

	scanf("%d",&t);

	while(t--){
		for(i=0;i<26;i++){
			a[i]=0;
		}
		k=0;
		flag2=0;

		scanf("%s",s);
		len=strlen(s);	
	
		for(i=0;i<len;i++){
			if(i==0){
				c[k]=s[i];
				k++;
			}
			else{
				flag1=0;
				for(j=0;j<i;j++){
					if(c[j]==s[i]){
						flag1=1;
						a[j]=1;
					}
				}
				if(flag1==0){
					c[k]=s[i];
					k++;
				}
			}
		}

		for(i=0;i<k;i++){
			if(a[i]==0){
				printf("%c\n",c[i]);
				flag2=1;
				break;
			}
		}

		if(flag2==0)
			printf("no\n");
	}
}
int main()
{
	int t,i,k,length,a[26]={0};
	char c[100005]={0};
	cin>>t;
	for(k=0;k<t;k++)
	{
		cin>>c;
		length=strlen(c);
		for(i=0;i<26;i++)
			a[i]=0;
		for(i=0;i<length;i++)
		{
			a[c[i]-'a']++;
		}
		for(i=0;i<length;i++)
		{
			if(a[c[i]-'a']==1)
				break;
		}
		if(i<length&&a[c[i]-'a']==1)
			cout<<c[i]<<endl;
		else
			cout<<"no"<<endl;
	}
	return 0;
}
// 1.cpp : Defines the entry point for the console application.
//
int num[26]={0};
int main()
{
	char sz[100001],*p;
	int t,i,m,n;
	scanf("%d",&t);
	getchar();
	for(i=1;i<=t;i++){
		gets(sz);
		m=strlen(sz);
		p=sz;
		n=0;
		int num[26]={0};
		int*pm=num;
		for(p=sz;p<sz+m;p++){
			(*(pm+(*p-97)))++;
		}
		for(p=sz;p<sz+m;p++){
			if((*(pm+(*p-97)))==1){
				n=-1;
				printf("%c\n",*p);
				break;
			}else{
				n++;
			}
		}
		if(n!=0&&n!=-1) printf("no\n");
	}
	return 0;
}
void main()
{
	int n,i,pd=0,l,j,no=0;
	char zf[100000],*ptr;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",zf);
		l=strlen(zf);
		ptr=&zf[0];
		for(;*ptr!='\0';ptr++)
		{
			for(j=0;j<l;j++)
			{
				if(*ptr==zf[j])
					pd++;
			}
			if(pd==1)
			{
				printf("%c\n",*ptr);
				no=1;
				pd=0;
				break;
			}
			pd=0;
		}
		if(no==0)
		{
			printf("no\n");
		}
		no=0;
	}
}
int main()
{
    int t,tt,i,j;
    int len;
    int letter[26]={0};
    char str[100000];
    cin>>t;
    for(tt=1;tt<=t;tt++)
    {
       cin>>  str;
       len=strlen(str);
       for(i=0;i<=len-1;i++)
       {
          letter[str[i]-'a']++;                                    
       }                  
      for(i=0;i<=len-1;i++)
      {
        if(letter[str[i]-'a']==1)
       {
         cout<<str[i]<<endl;    
         goto aa;
       }  
      }
      cout<<"no"<<endl;
 aa:     
      memset(letter,0,sizeof(letter));
      memset(str,0,sizeof(str));                             
    }
return 0;    
}
char yici(char s[])
{
	int i,j,temp=0,time=0;
	char a;
	for(i=0;i<strlen(s);i++)
	{
		for(j=0;j<strlen(s);j++)
		{
			if(s[i]==s[j])
				temp++;
		}
		if(temp==1)
		{
			a=s[i];
			time=1;
			break;
			
		}
		
		
		else temp=0;
			
		
		
	}
	if(time==1)
		return(a);
	else
		return('0');
}
void main()
{
	char s[100000];
	int n,i,j,temp=0,k;
	scanf("%d",&n);getchar();
	for(i=0;i<n;i++)
	{
		gets(s);
		if(yici(s)=='0')
		{printf("no\n");}
		else
			printf("%c\n",yici(s));
	}
	
}
int main()
{
   char a[1000],q;
   int ans[30];
   int n;
   int i,flag,j,k;
   
   scanf("%d",&n); 
   scanf("%c",&q);
      
   for (i=1;i<=n;i++) 
      {
          
          
          for (j=0;j<30;j++) ans[j]=0;
          flag=0;
                      
          gets(a);       
          
          
          for (j=0;j<strlen(a);j++) ans[a[j]-'a']++;
          
          for (j=0;j<strlen(a);j++)
            if (ans[a[j]-'a']==1)
             {
                 printf("%c\n",a[j]);                             
                 flag=1;      
                 break;   
             }
          if (flag==0) printf("no\n");
      } 
   return 0;
}
int main()
{
	char str[100000];
	int t,i,j,flag;
	cin >> t;
	for(i = 0; i < t; i++)
	{
		int count[26] = {0};
		flag = 0;
		cin >> str;
		for(j = 0; str[j] != '\0'; j++)
		{
			count[str[j] - 'a']++;
		}
		for(j = 0; str[j] != '\0'; j++)
		{
			if(count[str[j] - 'a'] == 1)
			{
				cout << str[j] << endl;
				flag = 1;
				break;
			}
		}
		if(flag == 0)
			cout << "no" << endl;
	}
	return 0;
}
int main()
{
    int b[26]={0},l[100],i,j,t,m,count=0,a,num[26];
    char s[10][1000];
    scanf("%d",&t);
    for(i=0;i<t;i++)
    {
      scanf("%s",s[i]);
      l[i]=strlen(s[i]);
     int b[26]={0};
     int num[26]={0};
      for(j=0;j<l[i];j++)
      {
        m=s[i][j]-'a';
        num[j]=m;
        b[m]++;
      }
    for(a=0;a<26;a++)
    {
        count=0;
       if(b[num[a]]==1)
       {
        s[i][j]='a'+num[a];
        printf("%c\n",s[i][j]);
        count++;
        break;
        }
    }
    if(count ==0)
    printf("no\n");
    } 
    getchar();
    getchar();
}
main()
{
    char s[100000];
    int t,i,j,k,n,m;
    scanf("%d",&t);
    for(k=0;k<t;k++)
    {
        scanf("%s",s);
        n=strlen(s);
        
        for(i=0;i<n;i++)
        {
            m=0;
            for(j=0;j<n;j++)
            {
                if(s[i]==s[j])
                m++;
                else;
            }
            if(m==1)
            break;
            else;
        }
        if(m!=1)
        printf("no\n");
        else
        printf("%c\n",s[i]);
    }
   
  
}
int main()
{
	int n, i, j, k, len, flag, mark, judge;
	cin >> n; // n???????
	char str[100000], outcome;
	for (i = 0; i < n; i++)
	{
		cin >> str;
		len = strlen(str);
		flag = 0;
		for (j = 0; j < len - 1; j++)
		{
			if (str[j] != '\0')
			{
				for (k = j + 1; k < len; k++)
				{
					if (str[j] == str[k])  
					{
						str[j] = '\0';
						str[k] = '\0';
						break;
					} // end if
				} // end for
			} // end if
		} // end for
		for (k = 0; k < len; k++)
		{
			if (str[k] != '\0')
			{
				outcome = str[k];
				break;
			}
			if (k == len - 1)
			{
				flag = 1;
			}
		}
		if (flag == 0)
		{
			cout << outcome << endl;
		}
		else
		{
			cout << "no";
		}
		if (i != n - 1)
		{
			cout << endl;
		}
	}
	return 0;
}