semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
int n,i,j,k;
scanf("%d",&n);
char z[n][20];
for(i=0;i<n;i++){
    scanf("%s",z[i]);
}
for(i=0;i<n;i++){
  k=0;
  for(j=0;z[i][j]!='\0';j++){
    if(j==0){
      if(z[i][j]<='z'&&z[i][j]>='a'|| z[i][j]<='Z'&& z[i][j]>='A'||z[i][j]=='_'){k=0;}
      else {k++;}
                 }
    else {if(z[i][j]<='z'&&z[i][j]>='a'|| z[i][j]<='Z'&& z[i][j]>='A'||z[i][j]>='0'&&z[i][j]<='9'||z[i][j]=='_'){k=k;}
             else {k++;}
            }
                               }
    if(k==0){printf("yes\n");}
    else printf("no\n");
                         }
return 0;
}
int main(int argc, char* argv[])
{
	int i, j, n, t, flag;
	char syx[21];
	scanf("%d", &n);
	for (i=0; i<n; i++)
	{
		flag = 1;
		scanf("%s", syx);
		t = strlen(syx);
		for (j=0; j<t; j++)
		{
			if(syx[j]==95)
				continue;
			else if(j==0 && syx[j] < 65 || syx[j] > 90 && syx[j] < 94 || syx[j] > 96 && syx[j] < 97 || syx[j]>122)
			{
				flag = 0;
				break;
			}
			else if(syx[j] < 48 || syx[j]>57 && syx[j] < 65 || syx[j] > 90 && syx[j] <97 || syx[j] > 122)
			{
				flag = 0;
				break;
			}
		}
		if (flag == 0)
			printf("no\n");
		else
			printf("yes\n");
	}

	return 0;
}
int legal(char s[20])
{
	int i;
	
	if((s[0]>='a'&&s[0]<='z')||(s[0]>='A'&&s[0]<='Z')||s[0]=='_'){
	    for(i=0;s[i]!='\0';i++){
		    if(!((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z')||s[i]=='_'||(s[i]>='0'&&s[i]<='9')))
				
			return 0;
		}
		return 1;
	}
	else 	
	    return 0;

}
int main(int argc, char* argv[])
{
	int n,i;
	scanf("%d",&n);
		char s[20];
	for(i=0;i<n;i++){
		scanf("%s",s);
		if(legal(s)==1)
			printf("yes\n");
		else
			printf("no\n");
		}
    return 0;
}
int main()
{int n,n1;
 scanf("%d",&n);
 A:for(n1=1;n1<=n;n1++)
 {
  char a[21];
  int i,z=0;
  scanf("%s",a);
 
  

  for(i=0;i<=strlen(a)-1;i++)
   {if((a[i]<48||(a[i]>57&&a[i]<65)||(a[i]>=91&&a[i]<=96)||a[i]>122)&&a[i]!='_')            
                         {z=1;printf("no\n");break;}
    }
   if(a[0]<65) {if(z==0) {printf("no\n");z=1;}}
  if(z==0) printf("yes\n");
  }
}
void main()
{
	char c[100][21];
	int i,j,n,b;
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%s",c[i]);
	for(i=0;i<n;i++) 
	{
		b=1;
		if(!(c[i][0]=='_'||(c[i][0]>='A'&&c[i][0]<='Z')||(c[i][0]>='a'&&c[i][0]<='z'))) b=0;
		for(j=1;j<strlen(c[i]);j++)
		{
			if(!(c[i][j]=='_'||(c[i][j]>='A'&&c[i][j]<='Z')||(c[i][j]>='a'&&c[i][j]<='z')||(c[i][j]>='0'&&c[i][j]<='9'))) {b=0;break;}
		}
		if(b==0) printf("no\n");
		else printf("yes\n");
	}
	getchar();
	
}
// xiaomingao.cpp : ??????????????
//

int main(){
int n,i,p,q;
char a[21];

scanf("%d",&n);
for(q=0;q<n;q++){
	int m=0;
    scanf("%s",a);
    p=strlen(a);
    for(i=0;i<p;i++){
		if(((a[0]>='A'&&a[0]<='Z')||(a[0]>='a'&&a[0]<='z')||(a[0]=='_'))&&((a[i]>='A'&&a[i]<='Z')||(a[i]>='a'&&a[i]<='z')||(a[i]>='0'&&a[i]<='9')||(a[i]=='_'))){
	            m=m+0;
	   }else{
	            m=m+1;
	   }

}
	if(m==0){
		printf("yes\n");
	}else{
	printf("no\n");
	}
	}
return 0;
}
int main()
{    char a[29];
    int i,j,n,k=0;
    int len;
    scanf("%d\n",&n);
    for(i=0;i<n;i++)
    { k=0;               
    scanf("%s",a);
    len=strlen(a);
     if((a[0]=='_')||(a[0]>='A')&&(a[0]<='Z')||
     (a[0]>='a')&&(a[0]<='z'))
     {for(j=1;j<len;j++)
      {if((a[j]=='_')||(a[j]>='A')&&(a[j]<='Z')||
     (a[j]>='a')&&(a[j]<='z')||(a[j]>='0')&&(a[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()
{
	char zz[100];
	int n,l,i;
	cin>>n;
     getchar();
	while(n--)
	{
		gets(zz);
		l = strlen(zz);
		for ( i = 0 ; i < l ; i ++ )
		{
			if ( zz[i]>='a' && zz[i]<='z' || zz[i]>='0'&&zz[i]<='9' || zz[i]>='A'&&zz[i]<='Z' || zz[i]=='_');
			else
				break;
		}
		if ( zz[0] >= '0' && zz[0] <= '9' )
			cout<<"no"<<endl;
		else if ( i == l )
			cout<<"yes"<<endl;
		else
			cout<<"no"<<endl;
	}
}
int main()
{
	char a[20][100];
	int i, j, n, flag;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%s",&a[i]);
	}
	for (i=0;i<n;i++)
	{
		flag=1;
		if ((a[i][0]>=65&&a[i][0]<=90)||(a[i][0]>=97&&a[i][0]<=122)||(a[i][0]>=128)||a[i][0]==95); 
		else flag=0;
		for (j=1;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]>=97&&a[i][j]<=122)||(a[i][j]>=128)||a[i][j]==95);
			else flag=0;
		}
		if (flag) printf("yes\n");
		else printf("no\n");
	}
	return 0;
}
int judgechar(char x){
	if(x>47&&x<58){return 0;}
	if(x>64&&x<91){return 0;}
	if(x>96&&x<123){return 0;}
	if(x>96&&x<123){return 0;}
	if(x==95){return 0;}
	return 1;}
int judgebegin(char x){
	if(x>64&&x<91){return 0;}
	if(x>96&&x<123){return 0;}
	if(x>96&&x<123){return 0;}
	if(x==95){return 0;}
	return 1;}
int main (){
	int all,i,p,len,ok;
	char input[21];
	scanf("%d",&all);
	for(i=0;i<all;i++){
		scanf("%s",input);
		len=strlen(input);
		ok=1;
		if(judgebegin(input[0])){
			
			
			ok=0;}
		for(p=1;p<len;p++){if(judgechar(input[p])){ok=0;}}
		if(ok==0){printf("no\n");}
		if(ok==1){printf("yes\n");}
	}

return 0;}
int main(int argc, char* argv[])
{
	int i,n,j,m,b;char s[21];
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		b=1;
		scanf("%s",s);
		m=strlen(s);
		for (j=0;j<m;j++)
		{
		    if (j==0)
			if ((s[0]>='0')&&(s[0]<='9'))
			{
			    printf("no\n");
			    b=0;
			}
		    if (b==0) break;
		    if (((s[j]>='0')&&(s[j]<='9'))||((s[j]>='A')&&(s[j]<='Z'))||((s[j]>='a')&&(s[j]<='z'))||(s[j]=='_')) b=b+0;
			else
			{
				printf("no\n");
				b=0;
			}
			if (b==0) break;
		}
		if (b==1) printf("yes\n");
    }
	return 0;
}
int main()
{
    int n,m;
	char s[20];
	int i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s);
        for(j=0;s[j];j++)
		{
			if(j==0)
			{if((s[0]>='a'&&s[0]<='z')||(s[j]>='A'&&s[j]<='Z')||s[j]=='_')
               m=1;
			else
			{	m=0;
			break;}
			}
			else
			{if((s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9')||s[j]=='_')
			m=1;
			else
			{m=0;
			break;}
			}
		}
		if(m==1)
			printf("yes\n");
		if(m==0)
			printf("no\n");
	}
	return 0;
}
int main()
{
	char str[100][20];
	char sample1[54];
	char sample2[64];
	int n;
	int i,j,k,tmp1,tmp2,tmp3,length;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",str[i]);
	}
	for(i=0;i<26;i++)
		sample1[i]=i+65;
	for(;i<52;i++)
		sample1[i]=i+71;
	sample1[53]=95;
	for(i=0;i<53;i++)
		sample2[i]=sample1[i];
	for(;i<63;i++)
		sample2[i]=i-5;
	sample2[63]=95;
	for(i=0;i<n;i++)
	{
		length=strlen(str[i]);
		for(j=0,tmp1=1;j<54;j++)
		{
			if(str[i][0]==sample1[j])
			{
				tmp1=0;
				break;
			}
		}
		if(tmp1==1)
		{
			printf("no\n");
			continue;
		}
		for(j=1,tmp3=1;j<length;j++)
		{
			for(k=0,tmp2=1;k<64;k++)
			{
				if(str[i][j]==sample2[k])
				{
					tmp2=0;
					break;
				}
			}
			if(tmp2==1)
			{
				printf("no\n");
				tmp3=0;
			}
			else
			{
				continue;
			}
			if(tmp3==0)
				break;
		}
		if(j==length)
			printf("yes\n");
	}
	return 0;
}
int main(){
	char zf[21];
	int n,judge=0;
	scanf("%d",&n);
	for(int j=0;j<n;j++){
		scanf("%s",zf);
		for(int i=0;zf[i];i++){
			if(!((zf[i]>='0'&&zf[i]<='9'&&i>0)||(zf[i]>='a'&&zf[i]<='z')||(zf[i]>='A'&&zf[i]<='Z')||(zf[i]=='_'))){
			judge=1;
			break;
			}
		}
		if(judge==0){
			printf("yes\n");
		}
		if(judge==1){
			printf("no\n");
		}
		judge=0;
	}
	return 0;
}
int main()
{
    int n;
	char str[500];
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		scanf("%s", str);
		if ((str[0] < 'a' || str[0] > 'z') && (str[0] < 'A' || str[0] > 'Z') && (str[0] != '_'))
		{
			printf("no\n");
			continue;
		}
		else if(strlen(str) == 1)
		{
			printf("yes\n");
		}
		else
		{
			int len = strlen(str);
			int j;
			for (j = 1; j < len; j++)
			{
				if ((str[j] < 'a' || str[j] > 'z') && (str[j] < 'A' || str[j] > 'Z') && (str[j] != '_') && (str[j] < '0' || str[j] > '9'))
					break;
			}
			if (j == len)
				printf("yes\n");
			else
				printf("no\n");
		}
	}
	return 0;
}
void main()
{
	char p[100][100]={"\0"};
	int i,j,flag,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",p[i]);
	for(i=0;i<n;i++,flag=1)
	{
		if(p[i][0]<='z'&&p[i][0]>='a'||p[i][0]<='Z'&&p[i][0]>='A'||p[i][0]=='_')
		{
		for(j=1;p[i][j]!='\0';j++)
			if(!(p[i][j]<='z'&&p[i][j]>='a'||p[i][j]<='Z'&&p[i][j]>='A'||p[i][j]=='_'||p[i][j]>='0'&&p[i][j]<='9'))
			{
				flag=0;
				break;
			}
		}
		else
			flag=0;
			if(flag)
				printf("yes\n");
			else
				printf("no\n");
	}
}
int main()
{
    int a;
	char shit[100][100];
	int i,j;
	scanf("%d",&a);
	int m=0;



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



	}
	if(judge==0){continue;}
	printf("yes\n");



	}

	
return 0;
}
char s[1000];
int main(){
	int T,i;
	scanf("%d",&T);
	while (T--){
		scanf("%s",s);
		if (isalpha(s[0])||s[0]=='_'){
			for (i=1;s[i];i++){
				if (!isalpha(s[i])&&!isdigit(s[i])&&s[i]!='_'){
					break;
				}
			}
			if (s[i]){
				puts("no");
			}else puts("yes");
		}else 
			puts("no");
	}
}
void main()
  {
  int m=0,n,i,j,k;
  char s[21];

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

            if(s[j]=='\0') printf("yes\n");
            if(s[j]!='\0') printf("no\n");
           }
         if (s[0]<='9'&&s[0]>='0')  printf("no\n");

    }

  }
int main()
{
	int n;
	int i,j;
	char s[21];
	int yn[1000];
	for(i=0;i<1000;i++)
	{
		yn[i]=1;
	}
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s);
		if((s[0]!='_')&&(s[0]<'A'||s[0]>'Z')&&(s[0]<'a'||s[0]>'z'))
		{
			yn[i]=0;
		}
		else
		{
			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'))
				{
					yn[i]=0;
				}
			
			}
		}
	}	
	for(i=0;i<n;i++)
	{
		if(yn[i]==0)
		{
			printf("no\n");
		}
		else
			printf("yes\n");
	}
	return 0;
}
void main()
{
	int n,i,j;
	int m;
	int f=0;
	char a[200][50];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
		m=strlen(a[i]);
		for(j=0;j<m;j++)
		{   if(a[i][0]>47&&a[i][0]<58)
		{
			printf("no\n");
			f=1;
			break;
		}
			 else if(a[i][j]>47&&a[i][j]<58)
			{	
			}
			else if(a[i][j]>64&&a[i][j]<91)
			{
			}
			else if(a[i][j]>96&&a[i][j]<123)
			{
			}
			else if(a[i][j]=='_')
			{}
			else 
			{	printf("no\n");
		
			f=1;
			break;
			
			}
		}
			if(f==0)
				printf("yes\n");
			else
				f=0;





	}
}
int main()
{
	int N,line,x,l,i;
	char a[21];
	scanf("%d\n",&N);
	for(line=1;line<=N;line++)
	{
		gets(a);
		l=strlen(a);
		if((a[0]=='_')||(a[0]>='A'&&a[0]<='Z')||(a[0]>='a'&&a[0]<='z'))
		{
			for(i=1;i<l;i++)
			{
				if((a[i]=='_')||(a[i]>='A'&&a[i]<='Z')||(a[i]>='a'&&a[i]<='z')||(a[i]>='0'&&a[i]<='9'))
				{
					x=1;
				}
				else 
				{
					x=0;
					break;
				}
			}

		    if(x==1)
			printf("yes\n");
	    	else if(x==0)
            printf("no\n");
		}
		else printf("no\n");
	}
	return 0;
}
int main()
{
    int n;
    char a[N],b[4];
    int i,j;

    gets(b);

    n=atoi(b);

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

    return 0;
}
int main(){
   int n,i,j,p;
   scanf("%d\n",&n);
   char str[22];
   for (i=0;i<n;i++){
      gets(str);
      p=0;
      for (j=0;str[j]!='\0';j++){
         if (j==0){
            if (str[j]>='a'&&str[j]<='z'){p++;}
            else if (str[j]>='A'&&str[j]<='Z'){p++;}
            else if (str[j]=='_'){p++;}
            else {p=p;}
         }
         if (j!=0){
            if (str[j]>='a'&&str[j]<='z'){p++;}
            else if (str[j]>='A'&&str[j]<='Z'){p++;}
            else if (str[j]=='_'){p++;}
            else if (str[j]>='0'&&str[j]<='9'){p++;}
            else {p=p;}  
         }
      }
      if (p==j){printf("yes\n");}
      else {printf("no\n");}
   }
   return 0;
}
int main(int argc, char* argv[])
{
	char s[100],sn;
	int n,i,j,k;
	gets(&sn);
	n=atoi(&sn);
    for (i=0;i<n;i++)
	{
		k=0;
       gets (s);
	   if ((s[0]>=65&&s[0]<=90)||(s[0]>=97&&s[0]<=122)||(s[0]==95))
	   {
		   for (j=1;s[j]!='\0';j++)
		   {
               if( !((s[j]>=65&&s[j]<=90)||(s[j]>=97&&s[j]<=122)||(s[j]==95)||(s[j]>=48&&s[j]<=57)))
			   {
				   printf("no\n");
				   k=1;
				   break;
			   }
			  
			   
		   }
		   if (k==0)
			   printf ("yes\n");
	   }
	   else 
		   printf ("no\n");
	}
	return 0;
}
void main ()
{
	int n,i,j,temp;
	char word[100][30];

	scanf("%d",&n);

	for(i=0;i<n;i++)
		scanf("%s",word[i]);
	for(i=0;i<n;i++)
	{
		temp=1;
		if (word[i][0]!='_')

	           if( word[i][0]>'z' ||  word[i][0]<'A' || word[i][0]>'Z'  && word[i][0]<'a' )
		            temp=0;
	for(j=1;j<strlen(word[i]);j++)
			if(word[i][j]<'0' || word[i][j]>'z' || word[i][j]>'9'&&word[i][j]<'A' || (word[i][j]>'Z' && word[i][j]<'a' && word[i][j]!='_'))
				temp=0;
	if(temp==0)
				printf("no\n");
			else
				printf("yes\n");
	}
}
int judgeChar(char c);
int judgeChars(char * c, int n);
int judgeChars(char * c, int n)
{
	int i;
	if((!judgeChar(c[0])) || isdigit(c[0]))
		return 0;
	for(i=1; i<n; i++)
		if(!judgeChar(c[i]))
			return 0;
	return 1;
}

int judgeChar(char c)
{
	if(isalnum(c) || c == '_')
		return 1;
	return 0;
}

int main()
{
	int i, n, result[100];
	char c[50];
	scanf("%d", &n);
	gets(c);
	for(i=0; i<n; i++)
	{
		gets(c);
		result[i] = judgeChars(c, strlen(c));
	}

	if(result[0])
			printf("yes");
	else
			printf("no");

	for(i=1; i<n; i++)
	{
		if(result[i])
			printf("\nyes");
		else
			printf("\nno");
	}
	return 0;
}
int main(){
	int n,i,k;
    char bsf[21];
	int len;
	int sz[100];

    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",bsf);
		len=strlen(bsf);
		for(k=0;k<len;k++){
			if((bsf[0]<'A')||
				(bsf[0]>'Z'&&bsf[0]!='_'&&bsf[0]<'a')||
				(bsf[0]>'z')){
				sz[i]=0;
				break;
			}
			if((bsf[k]<'0')||
				(bsf[k]>'9'&&bsf[k]<'A')||
				(bsf[k]>'Z'&&bsf[k]!='_'&&bsf[k]<'a')||
				(bsf[k]>'z')){
				sz[i]=0;
				break;
			}
			if(k==len-1){
				sz[i]=1;
				break;
			}
		}
	}
	for(i=0;i<n;i++){
		if(sz[i]==0){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}
	

	return 0;
}
int com(char sz_);
int com1(char sz_1);
int main()
{
    char sz[20][21];
    char sz_;
    char sz_1;
    int n,HH,JJ;
    scanf("%d",&n);
    for(HH=0;HH<n;HH++)
    {
        scanf("%s",sz[HH]);
    }

   
    for(HH=0;HH<n;HH++)
    {
      JJ=0;
     
      sz_=sz[HH][JJ];
      if(com(sz_)==0)
        {
            printf("no\n");
            continue;
        }
        for(JJ=1;sz[HH][JJ]!='\0';JJ++)
           {
            sz_1=sz[HH][JJ];
            if(com1(sz_1)==0)
                 {
                printf("no\n");
               break;

                  }
             }
  if(sz[HH][JJ]=='\0')
{        
            printf("yes\n");

}
    }

    
    
    
    
   return 0;         
}

int com(char sz_){
    int result;
    if(('a'<=sz_&&sz_<='z')||sz_=='_'||('A'<=sz_&&sz_<='Z'))
    {
        result=1;
    }
    else{
        result=0;
    }
    return result;
                   }
                   
int com1(char sz_1)
{
    int result1;
    if(('a'<=sz_1&&sz_1<='z')||sz_1=='_'||('A'<=sz_1&&sz_1<='Z')||('0'<=sz_1&&sz_1<='9'))

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

	}
	return 0;
}
int main()                           //?????            
{ 
  char a[100];                       //???????
                                     
  int n;
  cin>>n;                           //??????n?????? ???
  cin.getline(a,1000);              //????????
  for(;n>0;n--)
  {
      cin.getline(a,1000);         //?????
      if((a[0]<65||a[0]>90&&a[0]<97||a[0]>97+25)&&a[0]!='_') 
      {cout<<"no"<<endl;continue;} //???????????no????????     
      int i;
      for(i=1;;i++)                 //???????????????
      {
        if(a[i]==0)
         { 
           cout<<"yes";break;
         }
         if(a[i]>=65&&a[i]<=90)    continue;
         if(a[i]<=97+25&&a[i]>=97) continue;
         if(a[i]>=48&&a[i]<=48+9)  continue;
         if(a[i]=='_')    continue;
         cout<<"no";
         break;   
      } 
     cout<<endl;
 }        

  return 0;                     //?????
}
int main(){
    int n,i,j,s,S[100],G[100];
    scanf("%d",&n);
    char zf[100][21];
    for(i=0;i<n;i++){
        scanf("%s",zf[i]);
    }
    for(i=0;i<n;i++){ 
       if(
           (zf[i][0]>='A'&&zf[i][0]<='Z')||
           (zf[i][0]>='a'&&zf[i][0]<='z')||
            (zf[i][0]=='_')
            ){
            G[i]=strlen(zf[i]);
       for(j=0;j<G[i];j++){
           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]=='_')
              )
                 S[i]=1; 
           else {S[i]=0; 
           break;}
       }            
       }
       else S[i]=0;
       }
       for(i=0;i<n;i++)
      { 
     if(S[i]==0)printf("no\n");
       else printf("yes\n");     
      }
    return 0;
}
int main(int argc, char* argv[])
{
	char s[20];
	int i,j;
	int len;
	int k=0;
	int n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		k=0;
		/*  ????????????????
		 *  ????j=0??s[0]??????VC????????'\0'?
		 *  ???????????????
		for(j=0;s[j]!='\0';j++)
		{
			scanf("%c",&s[j]);
		}
		*/
		//??????????
		
		scanf("%s",s);    //???????????
		
		//s[j]='\0';

		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,flag=0,flag1=0,j;
	char a[21];
	scanf("%d",&n);

	for(j=1;j<=n;j++)
	{
		scanf("%s",a);
		if((a[0]==95) || (a[0]>=65 && a[0]<=90) || (a[0]>=97 && a[0]<=122))
		{
			flag=1;
		}
	    else
		{
			printf("no\n");
		}

		if(flag==1)
		{
			for(i=1;i<strlen(a);i++)
			{
				if((a[i]==95) || (a[i]>=65 && a[i]<=90) || (a[i]>=97 && a[i]<=122) || (a[i]>=48 && a[i]<=57))
				{
					flag1=1;
				}
				else
				{
					printf("no\n");
					flag1=2;
					break;
				}
			}
			if(flag1==1)
			{
				printf("yes\n");
			}		
		}
		memset(a,'0',sizeof(a));
	    i=0;
	    flag=0;
	    flag1=0;
	}
	return 0;
}
int main()
{
	char a[21];
	int n,i,j;
	cin>>n;
	cin.get();
	for(j=0;j<n;j++)
	{
		cin.getline(a,100);
		for(i=0;a[i]!='\0';i++)
		{
			if(i==0)
			{
				if(a[i]<65||(a[i]>90&&a[i]<95)||a[i]==96||a[i]>122)
				{
					cout<<"no"<<endl;
					break;
				}
			}
			else
			{
				if(a[i]<48||(a[i]>57&&a[i]<65)||(a[i]>90&&a[i]<95)||a[i]==96||a[i]>122)
				{
					cout<<"no"<<endl;
					break;
				}
			}
			if(i==strlen(a)-1)
				cout<<"yes"<<endl;
		}
	}
	return 0;
}
int main(){
    int n,l,i,j,k;
    scanf("%d",&n);
    char zfc[101];
    for(i=0;i<n-1;i++){
        k=0;
        scanf("%s",zfc);
        l=strlen(zfc);
        if(zfc[0]=='_'||(zfc[0]>='a'&&zfc[0]<='z')||(zfc[0]>='A'&&zfc[0]<='Z')){
            for(j=1;j<l;j++){
                if(zfc[j]=='_'||(zfc[j]>='a'&&zfc[j]<='z')||(zfc[j]>='A'&&zfc[j]<='Z')||(zfc[j]>='0'&&zfc[j]<='9')){k++;}
            }
        }
        if(k==l-1){printf("yes\n");}
        else{printf("no\n");}
    }
        k=0;
        scanf("%s",zfc);
        l=strlen(zfc);
        if(zfc[0]=='_'||(zfc[0]>='a'&&zfc[0]<='z')||(zfc[0]>='A'&&zfc[0]<='Z')){
            for(j=1;j<l;j++){
                if(zfc[j]=='_'||(zfc[j]>='a'&&zfc[j]<='z')||(zfc[j]>='A'&&zfc[j]<='Z')||(zfc[j]>='0'&&zfc[j]<='9')){k++;}
            }
        }
        if(k==l-1){printf("yes");}
        else{printf("no");}
    return 0;
}
int main()
{
    int n,i,j,sz[100];
    char sr[100][100];
    scanf("%d",&n);
	char zfc;
	scanf("%c",&zfc);
    for(i=0;i<n;i++){
		gets(sr[i]);
	}
    for(i=0;i<n;i++){
		sz[i]=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]=='_')){
					sz[i]=1;
				}else{
					sz[i]=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')){
				sz[i]=1;
				}else{
				sz[i]=0;
				break;
				}
				}else{
			    sz[i]=0;
				break;
			 }
		 }
	if(sz[i]==0){
		printf("no\n");
	}else{
		printf("yes\n");
	}
	}
    return 0;
}
int main(int argc, char* argv[])
{
	int n,i,j,t=0;
	char s[22];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s);
		for(j=0;s[j]!='\0';j++)
		{
			if(!((s[j]=='_')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||(s[j]>='0'&&s[j]<='9'&&j>0)))
            break;
		}
		if(s[j]!='\0')
                printf("no\n");
			else
				printf("yes\n");
		}
	return 0;
}
int main (){
char a[22];
int n,i,j,m;

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


}}return 0;}
int main(){
	int n,i,k,m;
	char s[21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",s);
		m=0;
		for(k=0;s[k]!='\0';k++){
			if(s[0]!='0'&&s[0]!='1'&&s[0]!='2'&&s[0]!='3'&&s[0]!='4'&&s[0]!='5'&&s[0]!='6'&&s[0]!='7'&&s[0]!='8'&&s[0]!='9'&&s[k]>='A'&&s[k]<='Z'||s[k]>='a'&&s[k]<='z'||s[k]>='0'&&s[k]<='9'||s[k]=='_')
			    m++;
		}
		if(m==k)
	    	printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
int main()
{
	char a[100][100];
	int j,n,i,count=0,t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	scanf("%s",&a[i]);
	for(j=0;j<strlen(a[i]);j++)
	{
		if((int)a[i][0]>47&&(int)a[i][0]<58)
		{count++;break;}
		if((((int)a[i][j])<58&&((int)a[i][j]>47))||(((int)a[i][j]<91)&&((int)a[i][j]>64))||(((int)a[i][j]<123)&&((int)a[i][j]>96))||(((int)a[i][j]==95)))
        	continue;
    	else count++;}
	   if(count==0)
		printf("yes\n");
		else printf("no\n");
		count=0; 
	}
	
return 0;
}
int main (){
char a[100];
int i,n,m=1;
int length;
char *p;
scanf("%d",&n);

for(i=0;i<n+1;i++){
gets(a);
    p=a;
	if(!( (*p=='_')|| (*p>64&&*p<91) || (*p>96&&*p<123) ) ){
		m=0;
	}
    length=strlen(a);
	for(p=a;p<a+length;p++){
		if(! ((*p=='_') || (*p>64&&*p<91) || (*p>96&&*p<123) || (*p>47&&*p<58) )){
					m=0;
					break;
		}
        
	}
	if(i>0){
		if(m==1)	printf("yes\n");
		if(m==0)    printf("no\n");
	}
	m=1;
}
return 0;
}