semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n;
    char zf[100][100];
    int i,j,sum[100];
    scanf("%d",&n);
    char ddd;
    scanf("%c",&ddd);
    for(i=0;i<n;i++)gets(zf[i]);
    for(i=0;i<n;i++){
        sum[i]=0;
        for(j=0;zf[i][j]!='\0';j++){
            if(j==0){if((zf[i][j]>='A'&&zf[i][j]<='Z')||(zf[i][j]>='a'&&zf[i][j]<='z')||(zf[i][j]=='_'))
             sum[i]=1;
             else  {
             sum[i]=0;
             break;
             }              
            }
            else if(j>0){
            if((zf[i][j]>='A'&&zf[i][j]<='Z')||(zf[i][j]>='a'&&zf[i][j]<='z')||(zf[i][j]>='0'&&zf[i][j]<='9')
            ||(zf[i][j]=='_'))
            sum[i]=1;
            else{
                sum[i]=0;
                break;
                
            }
            
        }
        else{
            sum[i]=0;
            break;
        }
        }
        if(sum[i]==0) 
        printf("no\n");
        if(sum[i]==1)
        printf("yes\n");
    }
    
    
    return 0;
}
int main()
{
	int n,m,i,j;
	char s[2020][20],b[20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",s[i]);
	}
	for(i=0,m=0;i<n;i++,m++){
		for(j=0;s[i][j]!='\0';j++){
			if(s[i][j]<=57&&s[i][j]>=48||s[i][j]<=90&&s[i][j]>=65||s[i][j]==95||s[i][j]<=122&&s[i][j]>=97){
				if(s[i][0]<=90&&s[i][0]>=65||s[i][0]<=122&&s[i][0]>=97||s[i][0]==95){
				b[m]=0;}
				else
				{
					b[m]=1;
					break;
				}
			}
			else
			{
				b[m]=1;
				break;}
		}
	}
	for(i=0;i<n;i++){
		if(b[i]==1){
			printf("no\n");
		}
		if(b[i]==0)
		{
			printf("yes\n");
		}
	}
		return 0;
}
main()
{
   char s[21];
   int i,n,len,j,x=0;
   scanf("%d",&n);
   for(i=0;i<n;i++)
   {
	   x=0;
	   scanf("%s",s);
	   len=strlen(s);
	   if((s[0]>='A'&&s[0]<='Z')||(s[0]>='a'&&s[0]<='z')||s[0]=='_')
	   {
		   for(j=1;j<len;j++)
		   {
		       if((s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||(s[j]>='0'&&s[j]<='9')||(s[j]=='_'))    x=x+0;
			   else x=x+1;
		   }
	       if(x==0)  printf("yes\n");
	       else  printf("no\n");
	   }
	   else printf("no\n");
   }
}
int main(){
	int a,i,j,l,pd=1;
	char jj[1000][21];
	scanf("%d",&a);
for(i=0;i<a;i++){
		scanf("%s",jj[i]);
		l=strlen(jj[i]);
    if(jj[i][0]==95||(jj[i][0]>=65&&jj[i][0]<=90)||(jj[i][0]>=97&&jj[i][0]<=122)){
		for(j=1;j<l;j++){
			 if(     jj[i][j]!=95&&(jj[i][j]<48||(jj[i][j]>57&&jj[i][j]<65)||(jj[i][j]>90&&jj[i][j]<97)||jj[i][j]>122)       ){
				 printf("no\n");
				 pd=0;
				 break;
			 }
		}
		if(j=l-1&&pd==1){
		printf("yes\n");
		}
		pd=1;
	}else{
	printf("no\n");
	}
}
	return 0;
}
int main()
{
	int n,i,t;
	char zfc[100][21];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%s",zfc[i]);
		for(t=0;zfc[i][t]!=0;t++)
		{
			if(zfc[i][t]<'0'||(zfc[i][t]>'9'&&zfc[i][t]<'A')||(zfc[i][t]>'Z'&&zfc[i][t]<'_')||(zfc[i][t]>'_'&&zfc[i][t]<'a')||zfc[i][t]>'z')
			{
				printf("no\n");
				break;
			}
			else if(zfc[i][0]>='0'&&zfc[i][0]<='9')
			{
                printf("no\n");
				break;
			}
		}
		if(zfc[i][t]==0)
		{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
    int i,j,n,a=1;
    char s[MAX+1];
    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)){
                continue;
             a=1;}
            else{    
                a=0;
                break;
            }
            
            }
        if(a==0){
             printf("no\n");
            }
        else if(a==1){
             printf("yes\n");
  }    a=1;
        }  
        return 0;
    }
int main()
{
	char a[100][21];
	int n,i,j;
	cin>>n;
	cin.ignore();
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++)
	{
		if(!((a[i][0] >= 'a' && a[i][0] <= 'z') || 
			(a[i][0] >= 'A' && a[i][0] <= 'Z') ||
			(a[i][0] == '_')))
		{
			cout<<"no"<<endl;
			continue;
		}
		else
		{
			for(j = 1; a[i][j]!='\0'; 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] =='_')))
				{
					cout << "no" <<endl;
					break;
				}
				if(a[i][j+1]=='\0')
					cout<<"yes"<<endl;
			}
			
		}
	}
	return 0;
}
int main()
{
	char s[100][20];
	int n,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",s[i]);
	}
	for(i=0;i<n;i++){
		int f=0;
		for(j=0;s[i][j]!='\0';j++){
			if(j==0){
				if(s[i][j]=='_'||(s[i][j]>='a'&&s[i][j]<='z')||(s[i][j]>='A'&&s[i][j]<='Z'))   continue;
				else f=1;
			}
			else{
				if(s[i][j]=='_'||(s[i][j]>='a'&&s[i][j]<='z')||(s[i][j]>='A'&&s[i][j]<='Z')||(s[i][j]>='0'&&s[i][j]<='9'))
				continue;
				else f=1;
			}
		}
		if(f==1)  printf("no\n");
	    if(f==0) printf("yes\n");
	}
	return 0;
}
main()
{
	char a[30][30];int c[30];
	int b,j,l,i,n;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
		scanf("%s",a[i]);
	for(i=0;i<=n-1;i++)
	{
		b=1;
		l=strlen(a[i]);
		if((a[i][0]<='z'&&a[i][0]>='a')||(a[i][0]<='Z'&&a[i][0]>='A')||(a[i][0]=='_'))
		{
		for(j=1;j<=l-1;j++)
		{
			if((a[i][j]<='z'&&a[i][j]>='a')||(a[i][j]<='Z'&&a[i][j]>='A')||(a[i][j]=='_')||((a[i][j])<='9'&&a[i][j]>='0'));
			else
				b=0;
		}
		}
		else b=0;
		if(b==0)
			c[i]=0;
		else
			c[i]=1;
	}
	for(i=0;i<=n-1;i++)
	{
		if(c[i]==1)
			printf("yes\n");
		else
			printf("no\n");
	}

}
int main()
{
	int q,i=0,n,j,w;
	char s[200];
	cin>>n;
	cin.get();
	for(j=1;j<=n;j++)
	{
		i=0;
		w=0;
	cin.getline(s,199);
	if(s[0]!='_'&&((s[0]>'z'||s[0]<'a')&&(s[0]>'Z'||s[0]<'A')))
	{
		cout<<"no"<<endl;
		continue;
	}
	while(s[i]!='\0')
	{
		if(s[i]!='_'&&((s[i]>'z'||s[i]<'a')&&(s[i]>'Z'||s[i]<'A'))&&(s[i]<'0'||s[i]>'9'))
		{
			w=1;
			break;
		}
		i++;
	}
	if(w==1)
	{
		cout<<"no"<<endl;
		continue;
	}else if(w==0)
	{
		cout<<"yes"<<endl;
	}
    }
    cin>>q;
    return 0;
}
int main(){
int n;
scanf("%d\n",&n);
for(int i=1;i<=n;i++){
char zfc[21];
scanf("%s\n",zfc);
int s;
if((65<=zfc[0]&&zfc[0]<=90)||(97<=zfc[0]&&zfc[0]<=122)||(zfc[0]==95)){s=1;}
else{s=0;}
for(int t=1;t<=20&&zfc[t-1]!=0;t++){
if((zfc[t-1]<48)||(57<zfc[t-1]&&zfc[t-1]<65)||(90<zfc[t-1]&&zfc[t-1]<95)||(zfc[t-1]==96)||(zfc[t-1]>122)){s=0;}
}
if(s==0){printf("no\n");}
else{printf("yes\n");}
}
return 0;
}
int main()
{
	char zfc[N][M];
	int n,i,j,k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",zfc[i]);
	}
	for(i=0;i<n;i++)
	{
		if(zfc[i][0]>='A'&&zfc[i][0]<='Z'||zfc[i][0]>='a'&&zfc[i][0]<='z')
		{
			k++;
		}
		else if(zfc[i][0]=='_')
		{
			k++;
		}
	    for(j=1;zfc[i][j]!='\0';j++)
		{
			if(zfc[i][j]>='0'&&zfc[i][j]<='9')
			{
				k++;
			}
			else if(zfc[i][j]>='A'&&zfc[i][j]<='Z'||zfc[i][j]>='a'&&zfc[i][j]<='z')
			{
				k++;
			}
			else if(zfc[i][j]=='_')
			{
				k++;
			}
		}
		if(k==j)
		{
			printf("yes\n");
		}
		else
		{
			printf("no\n");
		}
		k=0;
	}
	return 0;
}
int main() {
    int n,i,j;
    scanf("%d", &n);
    char a[21][21];
    int b[21][21],c[100];
    for(i=0;i<n;i++){
        c[i]=0;
    }
    for(i=0;i<n;i++){
        for(j=0;j<21;j++){
            b[i][j]=0;
        }
    }
    for(i=0;i<n;i++){
        scanf("%s", a[i]);
    }
    for(i=0;i<n;i++){
        for(j=0;j<strlen(a[i]);j++){
            if(((a[i][j]>='0')&&(a[i][j]<='9'))||((a[i][j]>='a')&&(a[i][j]<='z'))||((a[i][j]>='A')&&(a[i][j]<='Z'))||(a[i][j]=='_')){b[i][j]=0;
              }
            else{b[i][j]=1;}
        }
    }
    for(i=0;i<n;i++){
        if((a[i][0]>='0')&&(a[i][0]<='9')){
            b[i][0]=1;
        }
    }
    for(i=0;i<n;i++){
        for(j=0;j<21;j++){
            c[i]=c[i]+b[i][j];
        }
    }
    for(i=0;i<n;i++){
        if(c[i]==0){
            printf("yes\n");
        }
        else printf("no\n");
        
    }
    return 0;
}
int main (){
  int n,i,flag,j;
  scanf ("%d",&n);
  char a[21];

  for(i=0;i<n;i++){
   scanf ("%s",a);
   flag=0;
   if((a[0]=='_')||((a[0]<='z')&&(a[0]>='a'))||((a[0]>='A')&&(a[0]<='Z'))){
      for(j=1;a[j]!='\0';j++){
          if(!((a[j]=='_')||((a[j]<='z')&&(a[j]>='a'))||((a[j]>='A')&&(a[j]<='Z'))||((a[j]>='0')&&(a[j]<='9')))){
           flag=0;
          goto m;
          }
          else {
           flag=1;
           continue ;
          }
        }

   }


 m:if (flag){
 printf ("yes\n");
}else {
 printf ("no\n");
}
  }
return 0;

}
int main()
{
	int i,j,n,k=1;
	char name[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",name);
		for(j=0;name[j]!='\0';j++)
		{
			if(name[j]=='_'||(name[j]>='0'&&name[j]<='9'&&j!=0)||(name[j]>='a'&&name[j]<='z')||(name[j]>='A'&&name[j]<='Z'))
				continue;
			else 
			{
				k=0;
				break;
			}
		}	
		if (k==0)
			printf("no\n");
		else printf("yes\n");
		k=1;
	}
	return 0;
}
int main(){
int n,i,j,m;
char z[21];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",z);
int k=0;
if((z[0]>='A'&&z[0]<='Z')||(z[0]>='a'&&z[0]<='z')||(z[0]=='_'))	{
for(j=1;z[j]!='\0';j++){
if(z[j]>='0'&&z[j]<='9')
k++;
else if(z[j]>='a'&&z[j]<='z')
k++;
   else	if(z[j]>='A'&&z[j]<='Z')
k++;
   else	if(z[j]=='_')
k++;
else break;
}
m=strlen(z);
if(k==m-1)
printf("yes\n");
else
printf("no\n");
}
else if(z[0]<='9'&&z[0]>='0')
printf("no\n");
else
printf("no\n");
}
return 0;
}
int first(char x)
{
	if(x=='_'||(x>='a'&&x<='z')||(x>='A'&&x<='Z'))return 1;
	else return 0;
}
int term(char x)
{
	if(x=='_'||(x>='a'&&x<='z')||(x>='A'&&x<='Z')||(x>='0'&&x<='9'))return 1;
	else return 0;
}
int main()
{
	int n,i,j,t;
	char ch[50];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",ch);
		t=1;
		if(first(ch[0])==0)printf("no\n");
		else
		{
			for(j=1;j<strlen(ch);j++)
			{
				if(term(ch[j])==0)
				{
					t=0;
					break;
				}
			}
			if(t==1)printf("yes\n");
			else printf("no\n");
		}
	}
	return 0;
}
main()
{
    int n,i,j;
    scanf("%d\nj",&n);
    char a[100];
    for (i=0;i<n;i++)
    {
        gets(a);
        if (!(a[0]=='_' || (a[0]>='a'&&a[0]<='z') || (a[0]>='A'&&a[0]<='Z')))
        {
            printf("no\n");continue;
        }
        else
        {
            j=1;
            while(j<strlen(a))
            {
                if (!(a[j]=='_' || (a[j]>='a'&&a[j]<='z') || (a[j]>='A'&&a[j]<='Z') || (a[j]>='0'&&a[j]<='9')))
                {
                    printf("no\n");break;
                }
                j++;
            }
        }
        if(j==strlen(a)) printf("yes\n");
    }
}
void main()
{
     char a[100][20];
	 int i,j,n,len[100],s[100];
	 scanf("%d",&n);
	 for (i=1;i<=n;i++)
	 {   
		 s[i]=0;
		 scanf("%s",a[i]);
		 len[i]=strlen(a[i]);
		 if (((a[i][0]>='A')&&(a[i][0]<='Z'))||((a[i][0]>='a')&&(a[i][0]<='z'))||(a[i][0]=='_'))
		 {   
			 s[i]=1;
			 for (j=1;j<len[i];j++)
			 {
				 if (((a[i][j]>='A')&&(a[i][j]<='Z'))||((a[i][j]>='a')&&(a[i][j]<='z'))||(a[i][j]=='_')||((a[i][j]>='0')&&(a[i][j]<='9')))
					 s[i]++;
			 }
		 }
	 }
	 for (i=1;i<=n;i++)
	 {
		 if (s[i]==len[i])
			 printf("yes\n");
		 if (s[i]!=len[i])
			 printf("no\n");
	 }
	 
}
int main()
{
	int i,j,n,m;
	char zfc[1000][25];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",zfc[i]);
	}
	for(i=0;i<n;i++)
	{
		if((zfc[i][0]>='a'&&zfc[i][0]<='z')||(zfc[i][0]>='A'&&zfc[i][0]<='Z')||zfc[i][0]=='_')
		{
		    for(j=1;zfc[i][j]!='\0';j++)
			{
			   if((zfc[i][j]>='a'&&zfc[i][j]<='z')||(zfc[i][j]>='A'&&zfc[i][j]<='Z')||(zfc[i][j]>='0'&&zfc[i][j]<='9'||zfc[i][j]=='_'))
			   m=1;
			   else
			   {
				   m=0;
				   printf("no\n");
				   break;
			   }
			}
			 if(m==1)
				   printf("yes\n");
		}else{
            printf("no\n");    
		}
	}
	return 0;
}
int main() {  
char zf[100][21]; 
int n,i,j;
int m=0;
scanf("%d",&n); 
for(i=0;i<n;i++){
scanf("%s",zf[i]);}

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

   return 0;
}
int main()
{
    char a[100][21];
    int n=0,i,j,k;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
      scanf("%s",a[i]);
    }
   for(i=0;i<n;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++)
            {
                 if(a[i][j]=='\0')
                 {
                    printf("yes\n");
                    break;
                 }

                 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]=='_')))
                 {
                 printf("no\n");
                 break;
                 }
            }
        }
        else
        {printf("no\n");}

   }






    return 0;
}
int main()
{  
	int n;
	cin>>n;
	for(int i=0;i<n;++i)
	{
		char a[30];
		cin>>a;
		if((a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')||a[0]=='_')
		{
			int z=0;
			for(int i=1;a[i]!=0;++i)
			{
				if((a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')||a[i]=='_'||(a[i]>='0'&&a[i]<='9'))
				{
				}
				else
				{
				z=1;cout<<"no"<<endl;break;
				}

			}
			if(!z)cout<<"yes"<<endl;
		}
		else
		cout<<"no"<<endl;
	}
	return 0;
}
void main(){
	int n,l,first,result;
	int i,j;
	char id[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		result=1;
		scanf("%s",&id);
		l=strlen(id);
		if((id[0]>=65&&id[0]<=90)||(id[0]>=97&&id[0]<=122)||id[0]=='_'){
			first=1;
		}else{
			result=0;
			first=0;
		}
		for(j=1;j<l;j++){
			if(first){
				if((id[j]>=65&&id[j]<=90)||(id[j]>=97&&id[j]<=122)||id[j]=='_'||(id[j]>=48&&id[j]<=57)){
					;
				}else{
					result=0;
					break;
				}
			}else{
				break;
			}
		}
		if(result){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
}
int judge(char x[]);
void main()
{
	int n,p,i;
	char a[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
   	p=judge(a);
   	if(p==0)
   	{
   		printf("no\n");
   	}
   	if(p==1)
   	{
   		printf("yes\n");
   	}
   }
}

int judge(char x[])
{
	int i,len,k;
	len=strlen(x);
	k=0;
	if((x[0]>='a'&&x[0]<='z')||(x[0]>='A'&&x[0]<='Z')||(x[0]=='_'))
	{
   	for(i=0;i<len;i++)
   	{
   		if((x[i]>='a'&&x[i]<='z')||(x[i]>='A'&&x[i]<='Z')||(x[i]>='0'&&x[i]<='9')||(x[i]=='_'))
   		{
	   		k=k+0;
	   	}
	   	else k++;
	   }
		if(k==0)return 1;
		if(k!=0)return 0;
	}
	else return 0;
}
int main (){
	char str[100];
	int n, j, i, sz[100];
	scanf("%d", &n);
	for(i=0;i<n;i++){
		scanf("%s", str);
		if((str[0]<='Z'&&str[0]>='A')||str[0]=='_'||(str[0]<='z'&&str[0]>='a')){
		for(j=1;str[j]!='\0';j++){
			if((str[j]<='Z'&&str[j]>='A')||str[j]=='_'||(str[j]<='z'&&str[j]>='a')||(str[j]>='0'&&str[j]<='9')){
				sz[i]=1;
			}else{
				sz[i]=0;
				break;
			}
		}
		}else{
			sz[i]=0;
		}
	}
	for(i=0;i<n;i++){
		if(sz[i]==0){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
    int n,i,j,a=0;
    char s[21];
    scanf ("%d",&n);
    for (i=0;i<n;i++){
        int t1=1,t2=1;
        scanf ("%s",s);
        if (s[0]=='_'||(s[0]<='Z'&&s[0]>='A')||(s[0]<='z'&&s[0]>='a')){
            t1=1;
        }else {
            t1=0;
        }
        for (j=1;s[j];j++){
            if (s[j]=='_'||(s[j]<='Z'&&s[j]>='A')||(s[j]<='z'&&s[j]>='a')||(s[j]>='0'&&s[j]<='9')){
                a++;
            }else {
                t2=0;
            }
        }
        if (t1==1&&t2==1){
            printf ("yes\n");
        }else {
            printf ("no\n");
        }
    }
    return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	char a[100];
	for(int i=0;i<n;i++)
	{
		scanf("%s",a);
		if(a[0]-'A'>=0&&a[0]-'Z'<=0||
			a[0]-'_'==0||
			a[0]-'a'>=0&&a[0]-'z'<=0)
		{
			for(int j=1;j<100;j++)
			{
				if(a[j]=='\0')
				{
					printf("yes\n");
					break;
				}else
				if(a[j]-'A'>=0&&a[j]-'Z'<=0||
			       a[j]-'_'==0||
			       a[j]-'a'>=0&&a[j]-'z'<=0||
					a[j]-'0'>=0&&a[j]-'9'<=0)
				{
					continue;
				}else
				{
					printf("no\n");
					break;
				}

			}
		}else
		{
			printf("no\n");
		}
	}
        return 0;
}
int main(){
           int n,i,j,l,s;
           char a[20][21];
           scanf("%d",&n);
           for(i=0;i<n;i++) scanf("%s",a[i]);
           for(i=0;i<n;i++) {l=strlen(a[i]);
		   s=1;
							 for(j=0;j<l;j++) {	                             
								                 if(a[i][j]==95||(a[i][j]>=48&&a[i][j]<=57)||(a[i][j]>=65&&a[i][j]<=90)||(a[i][j]>=97&&a[i][j]<=122))
													 continue;
							                   else {s=0;
												   break;}
											 }
							if(a[i][0]>=48&&a[i][0]<=57) s=0;
							if(s==0) printf("no\n");
		                      else printf("yes\n");
							 }
			   return 0;
		   }
int main()
{
	int n,t;
	cin>>n;
	cin.get();
	while(n--)
	{
		char a[30];
		cin.getline(a,30);
		int str;
		str=strlen(a);
		
		for(int i=0;i<str;i++)
		{
			if((a[i]>='0'&&a[i]<='9')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')||a[i]=='_')
			{t=1;}
			else
			{ t=0;break;}
		}
		if(a[0]>='0'&&a[0]<='9')
				t=0;
			if(t)
				cout<<"yes"<<endl;
			else cout<<"no"<<endl;
	}
			return 0;
	}
int main(int argc, char* argv[])
{
	int n,i,k;
	char string[81];
	char *p;

	scanf("%d",&n);
	getchar();
	for(k=1;k<=n;k++){
	gets(string);
	p=string;
	if((*p=='_')||(*p>='a'&&*p<='z')||(*p>='A'&&*p<='Z'))
	{
		for(i=0;*(p+i)!='\0';i++)
		{
			if((*(p+i)=='_')||(*(p+i)>='a'&&*(p+i)<='z')||(*(p+i)>='A'&&*(p+i)<='Z')||(*(p+i)>='0'&&*(p+i)<='9'));
			else
			{
			printf("no\n");
			break;}
		}
		if(*(p+i)=='\0')
			printf("yes\n");
	}
	else 
		printf("no\n");}
	return 0;
}
int main(){
	int n,i,len,j,a=0;
	char str[21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",str);
		len=strlen(str);
		if(str[0]>=48&&str[0]<=57)
			printf("no\n");
		else{
			for(j=0;j<len;j++){
				if((str[j]>=48&&str[j]<=57)||(str[j]>=65&&str[j]<=90)||(str[j]>=97&&str[j]<=122)||str[j]==95)
					a=0;
				else{
					a=1;
					break;
				}
			}
			if(a==0) printf("yes\n");
			if(a==1) printf("no\n");
		}
	}
	return 0;
}
int main(){
 int n,i,k,p=0;
 char s[N][21];
 scanf("%d",&n);
 for(i=0;i<n;i++)
  scanf("%s",s[i]);
 for(i=0;i<n;i++){
  if((s[i][0]>='0')&&(s[i][0]<='9'))
    printf("no\n");
  else {for(k=0;s[i][k]!=0;k++){
         if(((s[i][k]>='a')&&(s[i][k]<='z'))||((s[i][k]>='A')&&(s[i][k]<='Z'))||((s[i][k]>='0')&&(s[i][k]<='9'))||(s[i][k]=='_'))
          p=1;
		 else {
			 printf("no\n");
			 break;
		 }

  }if(s[i][k]==0)
	printf("yes\n");
  }
 }
return 0;
}
int main(){
    int n,j;
    char zfc[N][LEN+1];
    scanf("%d",&n);
    for(j=0;j<n;j++){
        scanf("%s",zfc[j]);
    }
    int i,pd,pdjg;
    for(j=0;j<n;j++){
        pdjg=0;
        int p=strlen(zfc[j]);
        if((zfc[j][0]>='a'&&zfc[j][0]<='z')||(zfc[j][0]>='A'&&zfc[j][0]<='Z')||zfc[j][0]=='_'){
            for(i=1;i<p;i++){
                if((zfc[j][i]>='a'&&zfc[j][i]<='z')||(zfc[j][i]>='A'&&zfc[j][i]<='Z')||(zfc[j][i]>='0'&&zfc[j][i]<='9')||zfc[j][i]=='_'){
                    pd=1;
                    pdjg+=pd;
                }
                else{
                    pd=0;
                    pdjg+=pd;
                }
            }
        }
        else{
            pdjg=0;
        }
        if(pdjg==p-1){
            printf("yes\n");
        }
        else{
            printf("no\n");
        }
    }
    return 0;
}
int main(){
	int n,i,j;
	int bn[1000];
	char an[1000][21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",an[i]);
	for(i=0;i<n;i++)
		bn[i]=strlen(an[i]);
	for(i=0;i<n;i++){
		if(an[i][0]<65||(an[i][0]>90&&an[i][0]<95)||an[i][0]==96||an[i][0]>122){
			printf("no\n");
			continue;
		}
		else{
			for(j=1;j<bn[i];j++){
				if(an[i][j]<48||(an[i][j]>=58&&an[i][j]<=64)||(an[i][j]>=91&&an[i][j]<=94)||an[i][j]==96||an[i][j]>=123){
					printf("no\n");
					break;
				}
				if(j==bn[i]-1)
					printf("yes\n");
			}
		}
	}
		return 0;
	}
int main()
{
    char a[100][20]={0};
    int n, i, j, flag=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%s",a[i]);
    for(i=0;i<n;i++)
    {
        if(a[i][0]>='0'&&a[i][0]<='9')
        {
            printf("no\n");
            continue;
        }
        for(j=0;j<strlen(a[i]);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]=='_')
            {
                flag++;
            }
            else
            {
                printf("no\n");
                flag=0;
                break;
            }
        }
        if(flag==strlen(a[i]))
        {
            printf("yes\n");
            flag=0;
        }
    }
    return 0;
}
char s[MLEN][MAX];
int i,j,n;
int main(){
    scanf("%d",&n);
    for(i=0;i<=n-1;i++){
        scanf("%s",s[i]);
    }
    for(i=0;i<=n-1;i++){
        int a=1;
        for(j=0;s[i][j]!='\0';j++){
            if(!((s[i][j]=='_')||(s[i][j]>='A'&&s[i][j]<='Z')||(s[i][j]>='a'&&s[i][j]<='z')||(s[i][j]>='0'&&s[i][j]<='9'&&j>0))){
                a=0;
                break;
            }
        }
        if(a==1){
            printf("yes\n");
        }else if(a==0){
            printf("no\n");
        }
    }
}
int main(){
    int n;
    int sum[1000];
    scanf("%d",&n);
    char zfc[1000][20];
    int i,j;
    for(int i=0;i<n;i++){
        scanf("%s",&(zfc[i]));
    }
    for(int i=0;i<n;i++){
        sum[i]=1;
        if(zfc[i][0]<=57&&zfc[i][0]>=48)
        sum[i]=0;
        for(j=0;zfc[i][j]!='\0';j++){
            if((zfc[i][j]>=65&&zfc[i][j]<=90)||(zfc[i][j]>=97&&zfc[i][j]<=122)||(zfc[i][j]==95)||(zfc[i][j]>=48&&zfc[i][j]<=57));
        else{
            sum[i]=0;
            break;
        }
        }
        }
    for(int i=0;i<n;i++){
        if(sum[i]==0){
        printf("no\n");
    }
    else{
        printf("yes\n");
    }
    }
    return 0;
}
int main(){
    int n,i,m,k,p;
    scanf("%d",&n);
    char zfc[n][21],a,b;
    for(i=0;i<n;i++){
        scanf("%s",zfc[i]);
        m=strlen(zfc[i]);
        p=0;
      for(k=0;k<m;k++){
        if (k==0){if(zfc[i][k]=='_'||(zfc[i][k]>='a'&&zfc[i][k]<='z')||(zfc[i][k]>='A'&&zfc[i][k]<='Z')){
            p++;
        }}
        if(k!=0) {
           if((zfc[i][k]>='0'&&zfc[i][k]<='9')||(zfc[i][k]>='a'&&zfc[i][k]<='z')||(zfc[i][k]>='A'&&zfc[i][k]<='Z'||zfc[i][k]=='_')){p++;}
        }   
       }   
             if(p==m){printf("yes\n");}
             else{printf("no\n");}
             
      }
             
        
        return 0;
        
    
}
int main(){
	int i,k=0,m,n;
	scanf("%d",&n);
	int a[10000];
	char buf[21];
	for(m=0;m<n;m++){
		scanf("%s",buf);
	     for(i=0;buf[i];i++){  
             
            if((buf[i]=='_')||(buf[i]>='A'&&buf[i]<='Z')||(buf[i]>='a'&&buf[i]<='z')||(buf[i]>='0'&&buf[i]<='9'&&i!=0)) { 
			   a[k]=1;
			}else{
			   a[k]=0;
			   break;
			}
		}
		k++;
	}
	for(m=0;m<k;m++){
if(a[m]==0){
		   printf("no\n");
		}else{
		   printf("yes\n");
		};

	}

    return 0; 

}
int main()
{
char a[20][20];
int n,i,j,b=1;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",a[i]);
for(j=0;a[i][j]!='\0';j++){b=1;
if(a[i][0]<='9'&&a[i][0]>='0'){
b=0;break;}
else if((a[i][j]<='9'&&a[i][j]>='0')||(a[i][j]<='Z'&&a[i][j]>='A')||(a[i][j]<='z'&&a[i][j]>='a')||a[i][j]=='_')
b=b;
else {b=0;break;}}
printf(b==0?"no\n":"yes\n");}
return 0;
}
void fun(char data[])
{
     int len = strlen(data);
     int i;
     int ya;
     
     ya = ( *data == '_' || (*data >= 'A' && *data <= 'z') );
     
     for(i = 1; i <= len - 1; i++)
           if(!alphabet && !number)
                     ya = 0;
     
     if(ya == 0) printf("no\n"); else printf("yes\n");

}

int main()
{
    int n;
    scanf("%d\n", &n);
    int i;
    char data[81];
    
    for(i = 1; i <= n; i++)
    {
          gets(data);
          fun(data);
    }
        
    return 0;
}
int main()
{
	int n,i,len,j,e;
	char name[LEN];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		e=1;
		scanf("%s",name);
		len=strlen(name);
		if(name[0]!='_'&&isalpha(name[0])==0)
		{
			printf("no\n");
		}
		else
		{
			for(j=1;j<len;j++)
			{
				if(name[j]=='_'||(name[j]<58&&name[j]>47)||isalpha(name[j]))
				{
					e=1;
				}
				else
				{
					e=0;
					break;
				}
			}
			if(e==1)
			{
				printf("yes\n");
			}
			else
			{
				printf("no\n");
			}
		}
	}
	return 0;
}