semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n,l,i,j;
	scanf("%d",&n);
	char s[81];
	for(i=0;i<n;i++){
		gets(s);
		l=strlen(s);
		if(l==0){
			i--;
			continue;
		}
		for(j=0;j<l;j++){
			if((s[0]>='a'&&s[0]<='z')||(s[0]>='A'&&s[0]<='Z')||s[0]=='_'){
					if((s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||s[j]=='_'||(s[j]>='0'&&s[j]<='9')){
						if(j==l-1){
		                        printf("yes\n");
						}
					}
					else{
					printf("no\n");
					break;
					}
			}
				else{
					printf("no\n");
					break;
					}
		}
	}
	return 0;
}
int main(int argc, char* argv[])
{   int n,i,j,k;
    char p[21];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%s",p);
	 if(p[0]>='0'&&p[0]<='9')
	 {
		 printf("no\n");
	 }
	 else
	 {
	 for(j=0,k=0;j<strlen(p);j++)
	 {if((p[j]>='A'&&p[j]<='Z')||p[j]=='_'||(p[j]>='a'&&p[j]<='z')||(p[j]>='0'&&p[j]<='9'))
         k++;	
	 }
	 if(j==k)
		 printf("yes\n");
	 else
		 printf("no\n");
	}
	}
	return 0;
}
int main() {
	int n,i,a,b;
	char zfc[21];
	scanf("%d",&n);
	while(n!=0){
		scanf("%s",zfc);
		if((zfc[0]>='a' && zfc[0]<='z')||(zfc[0]>='A' && zfc[0]<='Z')||(zfc[0]=='_')){
			a=1;
		}else{a=0;}
		if(a==1){
			for(i=1;zfc[i]!='\0';i++){
				if((zfc[i]>='a' && zfc[i]<='z')||(zfc[i]>='A' && zfc[i]<='Z')||(zfc[i]=='_')||(zfc[i]>='0' && zfc[i]<='9')){
					b=1;
				}else{
					b=0;
					break;
				}
			}
		}
		if(a==1 && b==1){printf("yes\n");}
		else if(a==0 || (a==1 && b==0)){printf("no\n");}
		n--;
	}
	return 0;
}
void main()
{
	int i,n,j,flag;
	char t;
	char c[21]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",c);
		flag=1;
		j=1;
		t=c[0];
		if((t>='a'&&t<='z')||(t>='A'&&t<='Z')||t=='_')
			while((t=c[j])!='\0')
				if((t>='a'&&t<='z')||(t>='A'&&t<='Z')||t=='_'||(t>='0'&&t<='9'))j++;
				else {flag=0;break;}
		else {flag=0;}
		if(flag==1)printf("yes\n");
		else printf("no\n");
	}
}
void function(int,int);

int main()
{
   char s[20][100];
   int i,j,a,k;
   scanf("%d",&a);

   for(i=0;i<a;i++)
   {
      scanf("%s",s[i]);
   }

   for(i=0;i<a;i++)
   {
       k=0;
       if(s[i][0]<='9'&&s[i][0]>='0')
       {
           printf("no\n");
           continue;
       }
       for(j=0;j<strlen(s[i]);j++)
       {
           if((((s[i][j]<='9'&&s[i][j]>='0')||(s[i][j]<='Z'&&s[i][j]>='A')||(s[i][j]<='z'&&s[i][j]>='a')||(s[i][j]=='_')))==0)
           {
               printf("no\n");
               k=1;
               break;
           }
       }
       if(k==0) printf("yes\n");
   }

   return 0;

}
int main()
{
	int n,i,j,sum=0,len;
	char  a[23];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		len=0;
		sum=0;
		scanf("%s",&a);
        len=strlen(a);
		if(a[0]=='-'||(a[0]>='A'&&a[0]<='z'))
		{
			for(j=1;j<=len;j++)
			{
		        if ((a[j]>='A'&&a[j]<='Z')||(a[j]>='a'&&a[j]<='z')||(a[j]=='_') ||(a[j]>='0'&&a[j]<='9'))
                sum++;
			}
	       if(sum==len-1)
		   {
		      printf("yes\n");
		   }
		   else
		   {
              printf("no\n");
		   }
		}
			else
		{
			     printf("no\n");
		}
	}
	return 0;
}
int main()
{
    int n;
    char sr[100][100];
    int i,j,p;
    char ddd;
    scanf("%d",&n); 
    scanf("%c",&ddd);
    for(i=0;i<n;i++) 
        gets(sr[i]);
    for(i=0;i<n;i++)
    {
        p=0;
        for(j=0;sr[i][j]!='\0';j++)
        {
            if(j==0)
            {
                if( (sr[i][j]>='A'&&sr[i][j]<='Z')||(sr[i][j]>='a'&&sr[i][j]<='z')||(sr[i][j]=='_'))
                    p=1; 
                else
                {
                    p=0;
                    break;
                }
            }
            else if(j>0)
            {
                if ((sr[i][j]>='A'&&sr[i][j]<='Z')||(sr[i][j]>='a'&&sr[i][j]<='z')||(sr[i][j]=='_')||(sr[i][j]>='0'&&sr[i][j]<='9'))
                    p=1;
                else
                {
                    p=0;
                    break;
                }
            }
        }
        if(p==0) printf("no\n");
        else printf("yes\n");
    }                 
    
    return 0;
}
int main()
{
	int i,j,n,count=0,len;
	char fig[N+1];
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%s",fig);
		len=strlen(fig);
		if (fig[0]<'A'||(fig[0]>'Z'&&fig[0]<'_')||(fig[0]>'_'&&fig[0]<'a')||(fig[0]>'z'))
		{
			count++;
		}
		for (j=1;j<len;j++)
		{
				if ((fig[j]<'0')||(fig[j]>'9'&&fig[j]<'A'||(fig[j]>'Z'&&fig[j]<'_')||(fig[j]>'_'&&fig[j]<'a')||(fig[j]>'z')))
				{
					count++;
				}
		}
		if (count==0)
		{
			printf("yes\n");
		}
		else
		{
			printf("no\n");
		}
		count=0;
	}
	return 0;
}
int main()
{
	int i,n,j,b;
	int t;
	scanf("%d",&n);
	char a[100];
		for(i=0;i<n;i++)
        {
			scanf("%s",a);
            t=strlen(a);
		    if(a[0]=='_'||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z'))
            {
				b=0;
				for(j=1;j<t;j++)
				{
					if(a[j]=='_'||(a[j]>='0'&&a[j]<='9')||(a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z'))
					{
						b=0;
					}
					else
                    {
						b=1;
						break;
					}
				}
		
				if(b==1)
				{
					printf("no\n");
				}
				else
				{
					printf("yes\n");
				}

			}
			else
			{
				printf("no\n");
			}
		}
		
			
	return 0;
}
int main()
{
int p,i,n,l,a[10000],k;
char q[10000][20];
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%s",q[i]);
a[i]=1;}
for(i=0;i<n;i++)
{k=strlen(q[i]);
for(l=0;l<k;l++)
{p=q[i][l];
if(l==0)
{if(((p>=65)&&(p<=90))||((p>=97)&&(p<=122))||(p==95))
{continue;}
else
{a[i]=0;
break;}
}
else
{if(((p>=65)&&(p<=90))||((p>=97)&&(p<=122))||((p>=48)&&(p<=57))||(p==95))
{continue;}
else
{a[i]=0;
break;}
}
}
}
for(i=0;i<n;i++)
{if(a[i]==1)
{printf("yes\n");}
else if(a[i]==0)
{printf("no\n");}
}


  return 0;
}
int main()
{
char s[25];
int i,j;
int len;
int k;
int n;
scanf("%d",&n);
for(i=0;i<n;i++)
{   k=0;
	scanf("%s",s);
	len=strlen(s);
	if((s[0]=='_')||((s[0]>='A')&&(s[0]<='Z'))||((s[0]>='a')&&(s[0]<='z')))
	{
		for(j=1;j<len;j++)
		{
			if((s[j]=='_')||((s[j]>='A')&&(s[j]<='Z'))||((s[j]>='a')&&(s[j]<='z'))||((s[j]>='0')&&(s[j]<='9')))
			{k++;}
		}
		if(k==(len-1))
		{
			printf("yes\n");
		}
		if(k!=(len-1))
		{printf("no\n");}
	}
	else
	{
		printf("no\n");
	}
}
return 0;
}
int main()
{
	int n,i,j,a=0;
	char s[20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		a=0;
		scanf("%s",s);
		if((s[0]>='a'&&s[0]<='z')||(s[0]>='A'&&s[0]<='Z')||s[0]=='_')
		{	
			for(j=1;s[j]!='\0';j++)
			{
				if((s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||s[j]=='_'||(s[j]>='0'&&s[j]<='9'))
					continue;
			    else
					a=1;
			}
		}
		else
			a=1;
		if(a==1)
			printf("no\n");
		else
			printf("yes\n");
	}
	return 0;
}
int main()
{
int n,m,i,j,k,w;

char sfc[50];
scanf("%d",&n);
for (i=0;i<n;i++) {
	k=0;
	w=1;
scanf("%s",sfc);
if(sfc[0]>=48 && sfc[0]<=57)k=1;
for(j=0;j<strlen(sfc);j++){
	if((sfc[j]>=48 && sfc[j]<=57) || (sfc[j]>=65 && sfc[j]<=90) || (sfc[j]>=97 && sfc[j]<=122) || sfc[j]==95 ){	w=1;}
	else {
	  w=0;
	  break;
	}
	
	
}


if(w==0 || k==1) printf("no\n");

else printf("yes\n");
}
return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	char str[100][30];
	int i,j,k;
	for(i=0;i<n;i++)
	{
	    scanf("%s",str[i]);
	}
	for(i=0;i<n;i++)
	{
		int e;
		e=strlen(str[i]);
		k=0;
		if((str[i][0]<'A'||str[i][0]>'Z')&&(str[i][0]<'a'||str[i][0]>'z')&&(str[i][0]!='_'))
		{k=1;}
		for(j=0;j<e;j++)
		{
		   if((str[i][j]<'A'||str[i][j]>'Z')&&(str[i][j]<'a'||str[i][j]>'z')&&(str[i][j]<'0'||str[i][j]>'9')&&(str[i][j]!='_'))
		   {k=1;break;}
		}
		if(k==0){printf("yes\n");}
		if(k==1){printf("no\n");}
	}
return 0;
}
int main()
{
    int n,i;
    scanf("%d",&n);
    for(i = 0;i < n;i++)
    {
        char input[100];
        int len,j = 0;
        scanf("%s",input);
        len = strlen(input);
        if(input[0] == '_' || (input[0]>='a' && input[0]<='z') || (input[0]>='A' && input[0]<='Z'))
        {
            for(j = 1;j < len;j++)
                 if(!(input[j] == '_' || (input[j]>='a' && input[j]<='z') || (input[j]>='A' && input[j]<='Z') || (input[j] >= '0' && input[j] <= '9')))
                    break;
        }
        if(j == len)
            printf("yes\n");
        else
            printf("no\n");
    }
    return 0;
}
int main()
{
	int n,i,j,lm=0;
	char a[1000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		if(!((a[0]=='_')||(('a'<=a[0])&&(a[0]<='z'))||(('A'<=a[0])&&(a[0]<='Z'))))
				lm++;
		for(j=1;a[j];j++)
		{
			if(!((a[j]=='_')||(('a'<=a[j])&&(a[j]<='z'))||(('A'<=a[j])&&(a[j]<='Z'))||((48<=a[j])&&(a[j]<=57))))
                lm++;
		}
		if(lm==0)
			printf("yes\n");
		else printf("no\n");
		lm=0;
	}
	return 0;
}
int main()
{
	int i,j,n,t[200]={0};
	char a[200];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",&a);
		for(j=0;a[j];j++)
		{
			if((a[j]=='_')||(a[j]>='A'&&a[j]<='Z')||(a[j]>='a'&&a[j]<='z')||(a[j]>='0'&&a[j]<='9'&&j>0))
			{
				t[i]=1;
				continue;
			}
			else
			{
				t[i]=0;
				break;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		if(t[i]) printf("yes\n");
		else printf("no\n");
	}
	return 0;
}
void main()
{
	int n,i,j;
	char a[100][21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
		if((a[i][0]>=65&&a[i][0]<=90)||a[i][0]==95||(a[i][0]>=97&&a[i][0]<=122))
		{
			for(j=1;j<21&&a[i][j]!='\0';j++)
			{
				if((a[i][j]>=48&&a[i][j]<=57)||(a[i][j]>=65&&a[i][j]<=90)||a[i][j]==95||(a[i][j]>=97&&a[i][j]<=122))
					continue;
				else
					break;
			}
			if(a[i][j]=='\0')
				printf("yes\n");
			else
				printf("no\n");
		}
		else
			printf("no\n");
	}
}
void main()
{
	int n,i,sum,count=0;
	char num[30][21]={'\0'};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",num[i]);
	}

	for(i=0;i<n;i++)
	{
		int tmp=0,k=0,len;
			len=strlen(num[i]);

		while(num[i][k]!='\0')
		{

			if(k==0)
			{
				if((num[i][k]>='A' && num[i][k]<='Z') || (num[i][k]>='a' && num[i][k]<='z') || num[i][k]=='_') 
				{
					tmp++;
				}
				else 
				{
					printf("no\n");
					break;
				}
			}
			else
			{
				if((num[i][k]>='A' && num[i][k]<='Z') || (num[i][k]>='a' && num[i][k]<='z') || (num[i][k]>='0' && num[i][k]<='9') || num[i][k]=='_') 
				{
					tmp++;
				}
				else
				{
					printf("no\n");
					break;
				}
			}
			k++;
		}
		if(tmp==len) printf("yes\n");
	}
}

/*?? - ?? C ????   
 
?? ???? ???? 06 ????? ???? 
?? 
??n????????????????????C?????????????????????C????????
 
???? 
??????n???n?????????????????????????????20?
 
???? 
?????????????C????????????yes?????no?
 
???? 
6
GUE9NF1Ic
cGB8nd97F3
RKPEGX9R;TWyYcp
iefZIko1s}zy9XBg
sapOF3
6Lv5BYPeLPJ3vV`2[h
 
*/
int main()
{
int n;
scanf("%d",&n);
char zfc[100][20];
int i,j;
int e;
for(i=0;i<n;i++){
scanf("%s",zfc[i]);
} 
int k;

for(i=0;i<n;i++)
{
	k=0;
	
	for(j=0;zfc[i][j]!='\0';j++)
	{
		if((zfc[i][j]>='0'&&zfc[i][j]<='9')||(zfc[i][j]==95)||(zfc[i][j]>='A'&&zfc[i][j]<='Z')||(zfc[i][j]>='a'&&zfc[i][j]<='z'))
		{
			if(j==0)
			{
				if(zfc[i][0]>='0'&&zfc[i][0]<='9')
				{
				k+=1;
				}
				else
				{
				k+=0;
				}
			}
		k+=0;
		}
		else
		{
		k+=1;
		};
	}
	
	if(k==0)
	{
		if(i==(n-1))
		{
			printf("yes");
		}
		else{printf("yes\n");}
	}
	else
	{
		if(i==(n-1))
		{printf("no");}
		else{
			printf("no\n");}
	}

}

return 0;
}
int main()
{
	char a[20][20];
	int n,i,j,l,result[20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
		l=strlen(a[i]);
		if((a[i][0]>='a'&&a[i][0]<='z')||(a[i][0]>='A'&&a[i][0]<='Z')||(a[i][0]=='_'))
		{
		    for(j=1;j<l;j++)
	    	{
	     		if(!((a[i][j]>='a'&&a[i][j]<='z')||(a[i][j]>='A'&&a[i][j]<='Z')||(a[i][j]>='0'&&a[i][j]<='9')||(a[i][j]=='_')))
	     		{
		    		result[i]=0;
					break;
				}
				if(j==l-1)
				{
					if((a[i][j]>='a'&&a[i][j]<='z')||(a[i][j]>='A'&&a[i][j]<='Z')||(a[i][j]>='0'&&a[i][j]<='9')||(a[i][j]=='_'))
					{
						result[i]=1;
					}
					else
					{
						result[i]=0;
					}
				}
			}
		}
		else
		{
			result[i]=0;
		}
	}
	for(i=0;i<n;i++)
	{
		if(result[i]==0)
		{
	    	printf("no\n");
		}
		else
		{
			printf("yes\n");
		}
	}
	return 0;
}
main()
{
    int n,i,j,t;
	char a[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		j=0;
		t=0;
		while(a[j]!='\0')
		{
			if(!((a[j]=='_')||((a[j]<='z')&&(a[j]>='a'))||((a[j]<='Z')&&(a[j]>='A'))||((a[j]<='9')&&(a[j]>='0'))))
				t=1;
			j++;
		}
		t=t+((a[0]<='9')&&(a[0]>='0'));
		if(t==0)
			printf("yes\n");
		else
			printf("no\n");
	}
}
int main(){
    char s[21];
    int n,i,j;
    int b[100]={0};
    scanf("%d",&n);
  
    for(i=0;i<n;i++){
    scanf("%s",s);
    for(j=0;j<strlen(s);j++){
        if(s[j]=='_'||(s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9'&&j>0)){
            continue;
        }else{
            b[i]=1;
            break;
        }
    }
    }
    for(i=0;i<n;i++)  {
    if(b[i]==0){
        printf("yes\n");
    }else{
        printf("no\n");
    }
    }   
    return 0;
}
int main()
{
   int n;
   cin>>n;
   cin.get();
  
   for(int i=0;i<n;i++)
	  { char a[21];
		  int judge=1;
		  cin.getline(a,21);
		  if(a[0]>='0'&&a[0]<='9')
		  judge=0;
		  else
		  for(int j=0;j<strlen(a);j++)
		  {  
			  if((a[j]<'0'||a[j]>'9')&&(a[j]<'A'||a[j]>'Z')&&(a[j]<'a'||a[j]>'z')&&a[j]!='$'&&a[j]!='_')
			{
				 judge=0;  break;
			 }
			 /* if (a[j]=='_' && a[j+1]=='_') 
			  {
				  judge=0;break;
			  }*/
		}
		  if(judge==1) cout<<"yes"<<endl;
		  else if(judge==0)  cout<<"no"<<endl;
      }

   return 0;
	
}
int main() {
   int n,result,i;
   char zfc[21];
   scanf("%d",&n);
   while(n--){
     scanf("%s",zfc);
     if((zfc[0]>='A'&&zfc[0]<='Z')||(zfc[0]>='a'&&zfc[0]<='z')||(zfc[0]=='_')){
       for(i=1;zfc[i]!='\0';i++){
          if((zfc[i]>='A'&&zfc[i]<='Z')||(zfc[i]>='a'&&zfc[i]<='z')||(zfc[i]=='_')||(zfc[i]>='0'&&zfc[i]<='9')){
              result=1;
          }else{
              result=0;
              break;         
          }
        }
     }else{
        result=0;
     }
     if(result==1){
        printf("yes\n");
     }else{
        printf("no\n");
     }
   }
   return 0;
}
const int M = 21;

int main(int argc, char* argv[])
{
	char s[M];
	int n,i,j;
	scanf("%d",&n);
	i = n;
	while(i--)
	{
		scanf("%s",&s);
		for(j = 0;s[j]!='\0';j++)
		{
			//48-57 65-90 97-122
			if(!((s[j]=='_')||(s[j]>='0'&& s[j]<='9' && j>0)||(s[j]>='a'&& s[j]<='z')||(s[j]>='A'&& s[j]<='Z')))
				break;
		}
		printf(s[j] ? "no\n":"yes\n");
	}
	return 0;
}
int main()
{
	int n,flag;
	char a[22];
	cin>>n;
	cin.get();
	while(n--){
		flag=0;
		cin.getline(a,22);
		for(int i=0;a[i]!='\0';i++){
			if(a[0]<65||(a[0]>90&&a[0]<97&&a[0]!=95)||a[0]>122){
				cout<<"no"<<endl<<endl;
				flag=1;
				break;
			}
			else if(a[i]<48||(a[i]>57&&a[i]<65)||(a[i]>90&&a[i]<97&&a[i]!=95)||a[i]>122){
				cout<<"no"<<endl<<endl;
				flag=1;
				break;
			}
		}
		if(flag==0)
			cout<<"yes"<<endl<<endl;
	}
	return 0;
}
int main(){
    int n,i,l,m=0,j;
    char zfc[21];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%s",zfc);
        l=strlen(zfc);
        if((zfc[0]>='a'&&zfc[0]<='z')||(zfc[0]>='A'&&zfc[0]<='Z')||(zfc[0]=='_')){
            for(j=1;j<l;j++){
            if(!((zfc[j]>='a'&&zfc[j]<='z')||(zfc[j]>='A'&&zfc[j]<='Z')||(zfc[j]=='_')||(zfc[j]>='0'&&zfc[j]<='9'))){
                puts("no");
                break;
                }
                if(j==l-1){
                    puts("yes");
                }
            }
        }else puts("no");
    }

    return 0;
}
int main()
{
    int i,j,n;
    char s[21],x[99];              
    scanf("%d",&n);             
    for (i=0;i<n;i++)
	{    
        scanf("%s",&s);          
        for(j=0;s[j];j++) 
		{ 
            if(!((s[j]=='_')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||(s[j]>='0'&&s[j]<='9'&&j>0)))
			{
				x[i]=0;
                break;
			}
			else
				x[i]=1;
        }
	}
        

		for (i=0;i<n;i++)
		{
			if(x[i]==0)
			printf("no\n");
			if(x[i]==1)
			printf("yes\n");
		}   
    return 0;
}
void main()
{
	int n,i,j,k;
	char a[1000][20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",&a[i]);
		for(j=0;j<strlen(a[i]);j++)
		{
			if((a[i][j]<'0'||a[i][j]>'z'||(a[i][j]<'a'&&a[i][j]>'Z')||(a[i][j]<'A'&&a[i][j]>'9'))&&a[i][j]!='_')
			{  k=0;break;}
			else if(a[i][0]>='0'&&a[i][0]<='9')
			{
				k=0;break;}
			k=1;
		}
		if(k) printf("yes\n");
		else printf("no\n");
	}
}
int main()
{
	int n;
	cin>>n;
	int o;
	for(o=0;o<n;o++)
	{
		char str[21];
		int pan=0;
		cin>>str;
		if(str[0]==95||(str[0]<=122&&str[0]>=97)||(str[0]<=90&&str[0]>=65))
		{
			int i;
			for(i=1;str[i]!='\0';i++)
			{
				if(str[i]==95||(str[i]<=122&&str[i]>=97)||(str[i]<=90&&str[i]>=65)||(str[i]<=57&&str[i]>=48))
					pan=1;
				else
				{
					pan=0;
					break;
				}
			}
		}
		else
			pan=0;
		if(pan==1)
			cout<<"yes"<<endl;
		else
			cout<<"no"<<endl;

	}
	return 0;
}
int main(){
    char zf[30];
	int n,i,j,c,b;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zf);
		b=0;
		c=0;
		for(j=0;zf[j]!='\0';j++){
			c++;
			if(((zf[0]<='z'&&zf[0]>='a')||(zf[0]<='Z'&&zf[0]>='A')||zf[0]=='_')&&((zf[j]<='z'&&zf[j]>='a')||(zf[j]<='Z'&&zf[j]>='A')||zf[j]=='_'||(zf[j]>='0'&&zf[j]<='9'))){
				b++;
			}
		}
		if(c==b)
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
int main(){
       int n;
       scanf("%d",&n);
       char s[100][100];   
       int i,j,a[100];   
       for(i=0;i<n;i++) {scanf("%s",&s[i]);}
       for(i=0;i<n;i++) { 
                 a[i]=0;  
      for(j=0;s[i][j]!='\0';j++)  {
                     if(j==0)   { 
                    if( (s[i][j]>='A'&&s[i][j]<='Z')|| (s[i][j]>='a'&&s[i][j]<='z')||(s[i][j]=='_'))
                    a[i]=1;
                else   {  
                        a[i]=0; 
                        break; 
                          }
                          }
        else if(j>0){
                if ((s[i][j]>='A'&&s[i][j]<='Z')||(s[i][j]>='a'&&s[i][j]<='z')||(s[i][j]=='_') || (s[i][j]>='0'&&s[i][j]<='9'))
                  a[i]=1;   
        else   {    a[i]=0;    break;   }  }
        else   {    a[i]=0;    break;   }  }  
        if(a[i]==0) printf("no\n"); 
         else printf("yes\n"); } 
             return 0;
             }
int main(){
	int n,c;
	scanf("%d",&n);
	char sz[21];
	for(int i=0;i<n;i++){
		c=0;
		scanf("%s",sz);
		for(int j=0;sz[j];j++){
			if(!((sz[j]=='_')||
				(sz[j]>='A'&&sz[j]<='Z')||
				(sz[j]>='a'&&sz[j]<='z')||
				(sz[j]>='0'&&sz[j]<='9'&&j>0))){
				c++;
			}
		}
		if(c!=0){printf("no\n");}
		if(c==0){printf("yes\n");}
	}
	return 0;
}
int main()
{
	int n,p;
	char s[100];
	cin>>n;cin.getline(s,1);
	while (n>0)
	{
	cin.getline(s,100);
	int l=strlen(s);
	p=0;
	if ((s[0]=='_')
	|| ((s[0]-'a'>=0)&&(s[0]-'a'<26))
	|| ((s[0]-'A'>=0)&&(s[0]-'A'<26))) p=1;
	for (int i=1;i<l;i++)
	if (!(
		(s[i]=='_')
	|| ((s[i]-'a'>=0)&&(s[i]-'a'<26))
	|| ((s[i]-'A'>=0)&&(s[i]-'A'<26))
	|| ((s[i]-'0'>=0)&&(s[i]-'0'<10))
		))
		p=0;
		if (p) cout<<"yes"<<endl; else cout<<"no"<<endl;
		n--;
	}
//cin>>l;
}
int main ()
{
int n,x;
cin >> n;
for(int i=0 ;i<n;i++)
{
x=0;
char a[22];
cin>>a;
for(int j=0;a[j]!='\0';j++)
{
if(j==0) {if((a[j]>64&&a[j]<91)||(a[j]>96&&a[j]<123)||a[j]=='_') continue;}
else if((a[j]>64&&a[j]<91)||(a[j]>96&&a[j]<123)||a[j]=='_'||(a[j]>47&&a[j]<58)) continue;
x=1;
}
if(x==0) cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
return 0;
}
int isidentifor(const char* name)
{
    const char *p = name;
    char ch = *p;
    if ((ch < 'A' || ch > 'Z') && (ch < 'a' || ch > 'z') && (ch != '_'))
    {
        return 0;
    }
    for (p++; *p; p++)
    {
        ch = *p;
        if ((ch < 'A' || ch > 'Z') && (ch < 'a' || ch > 'z') && (ch != '_') && (ch < '0' || ch > '9'))
        {
            return 0;
        }
    }
    return 1;
}

int main()
{
    char name[33];
    int n;

    scanf("%d", &n);
    while (n--)
    {
        scanf("%s", name);

        if (isidentifor(name))
        {
            printf("yes\n");
        }
        else 
        {
            printf("no\n");
        }
    }
    return 0;
}
void main()
{
	int n,i,j,k;
	char a[1500][20];
	int b[1500];
	int c[1500]={0};    //???????0 ????1
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
		b[i]=strlen(a[i]);
	}
	for(j=0;j<n;j++)
	{
		k=0;
		for(i=0;i<b[j];i++)
		{
			if((a[j][i]>='a'&&a[j][i]<='z')||(a[j][i]>='A'&&a[j][i]<='Z')||(a[j][i]>='0'&&a[j][i]<='9')||(a[j][i]=='_'))
				k++;
		}
		if(k==b[j])
			c[j]=1;	
		if((a[j][0]>='0')&&(a[j][0]<='9'))    //??????~
			c[j]=0;
	}
	for(j=0;j<n;j++)
	{
		if(c[j]==0)
			printf("no\n");
		else
			printf("yes\n");
	}
}
int main(){
    int n,special=0;
    int i,j;
    scanf("%d",&n);
    char a[n][22];
    for(i=0;i<n;i++){
        scanf("%s",a[i]);
    }
    for(i=0;i<n;i++){
        for(j=0;a[i][j]!='\0';j++){
        if(a[i][0]>=48&&a[i][0]<=57){
            printf("no\n");
            special++;
            break;
        }
        if(a[i][j]!=95&&(a[i][j]<65||a[i][j]>90)&&(a[i][j]<97||a[i][j]>122)&&(a[i][j]<48||a[i][j]>57)){
            printf("no\n");
            special++;
            break;
        }
        }
        if(special==0){
            printf("yes\n");
        }
        special=0;
    }
    return 0;
}
int main()
{
	char a[100];
	int n,i,j,flag;
	cin>>n;
	cin.get();
	for(i=0;i<n;i++)
	{
		flag=1;
		for(j=0;j<100;j++)
			a[j]='\0';
		
		cin.getline(a,100);
		if(a[0]!=95&&(a[0]<65||(a[0]>90&&a[0]<97)||a[0]>122))
		{
			cout<<"no"<<endl;
			continue;
		}
		else 
		{
			for(j=1;a[j]!='\0';j++)
			{
				if(a[j]!=95&&(a[j]<65||(a[j]>90&&a[j]<97)||a[j]>122)&&(a[j]<48||a[j]>57))
				{
					cout<<"no"<<endl;
					flag=0;
					break;
				}
			}
			if(flag==1)
				cout<<"yes"<<endl;
		}
	}
	return 0;
}
int main(){
	int n,i,j,l;
	scanf("%d",&n);
	char zfc[100][21];
	for(i=0;i<n;i++){
		scanf("%s",&zfc[i]);
	}
	for(i=0;i<n;i++){
		l=strlen(zfc[i]);
		for(j=0;j<l;j++){
			if(zfc[i][j]>='0'&&zfc[i][j]<='9'&&!(zfc[i][0]>='0'&&zfc[i][0]<='9')){
				continue;
			}
			else if(zfc[i][j]>='a'&&zfc[i][j]<='z'){
				continue;
			}
			else if(zfc[i][j]>='A'&&zfc[i][j]<='Z'){
				continue;
			}
			else if(zfc[i][j]=='_'){
				continue;
			}
			else{
				printf("no\n");
				break;
			}
		}
		if(j==l){
			printf("yes\n");
		}
	}
	return 0;
}
int main()
{
    char s[100];
    int i,n,l=0,j,k=0;
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
     scanf("%s",s);
        l=strlen(s);
      
        
        if(((s[0]>='A')&&(s[0]<='Z'))||((s[0]>='a')&&(s[0]<='z'))||(s[0]=='_') )
           {for (j=1;j<l;j++)
              if (((s[j]>='A')&&(s[j]<='Z'))||((s[j]>='a')&&(s[j]<='z'))||(s[j]=='_')||((s[j]>='0')&&(s[j]<='9')))
                k++;
              else
                {puts("no"); k=0;break;}
                
              if (k+1==l) {puts("yes");k=0;}} 
          
                  else
                    {puts("no");k=0;}
    }
                    
         return 0;   
        
}
int main()
{
    int n,i,j;
	scanf("%d",&n);
	int length[1000];
	char a[1000][20];
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
		length[i]=strlen(a[i]);
	}
    for(i=0;i<n;i++)
	{
		if(a[i][0]>=48&&a[i][0]<=57)
		{
			printf("no");
			
		}
		else 
		{
			for(j=0;j<20;j++)
			{
				if(a[i][j]<48)
				{
					break;
				}
				else if(a[i][j]>=58&&a[i][j]<=64)
				{
					break;
				}
				else if(a[i][j]>=91&&a[i][j]<=94 ||a[i][j]==96)
				{
					break;
				}
				else if(a[i][j]>=123&&a[i][j]<=126)
				{
					break;
				}			

			}
			if(j>=length[i])
			{
				printf("yes");
			}
			else
			{
				printf("no");
			}
			printf("\n");
			
		}
		printf("\n");
	}	
	return 0;
}
int main(){
    int n,b;
    scanf("%d",&n);
    char zfc[N][21];
    for(int i=0;i<n+1;i++){
        gets(zfc[i]);
    }
    b=strlen(zfc[0]);
    for(int k=0;k<n+1;k++){
        for(int m=0;m<b;m++){
            if(m==0){if((zfc[k][m]=='_')||(zfc[k][m]>='a'&&zfc[k][m]<='z')||(zfc[k][m]>='A'&&zfc[k][m]<='Z')){continue;}
            else {printf("no\n");break;}
            }
            if(m!=0&&m+1!=b){if((zfc[k][m]=='_')||(zfc[k][m]>='a'&&zfc[k][m]<='z')||(zfc[k][m]>='A'&&zfc[k][m]<='Z')||(zfc[k][m]>='0'&&zfc[k][m]<='9'))
            {continue;}else {printf("no\n");break;}
            }
            if(m+1==b){
                if((zfc[k][m]=='_')||(zfc[k][m]>='a'&&zfc[k][m]<='z')||(zfc[k][m]>='A'&&zfc[k][m]<='Z')||(zfc[k][m]>='0'&&zfc[k][m]<='9')){
                    printf("yes\n");
                }
                else{printf("no\n");}
            }
    }
    b=strlen(zfc[k+1]);
    }
    return 0;
}