semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n;
	int i,j;
	int k[20],l[100];
	char bsf[100][20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",bsf[i]);
	}
	for(i=0;i<n;i++){
		j=0;
		k[i]=0;
		l[i]=strlen(bsf[i]);
		for(j=0;j<l[i];j++){
			if((bsf[i][0]=='_')||(bsf[i][0]>='a'&&bsf[i][0]<='z')||(bsf[i][0]>='A'&&bsf[i][0]<='Z')){
				if((bsf[i][j]=='_')||(bsf[i][j]>='a'&&bsf[i][j]<='z')||(bsf[i][j]>='A'&&bsf[i][j]<='Z')||(bsf[i][j]>='0'&&bsf[i][j]<='9')){
					k[i]++;
				}
			}
		}
	}
	for(i=0;i<n;i++){
		if(k[i]==l[i]){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	
	return 0;
}
int main(){
char s[100];
int i,j,n;
scanf("%d",&n);
for(i=0;i<n;i++){
 scanf("%s",s);
 if( !(s[0]>='a'&&s[0]<='z' || s[0]>='A'&&s[0]<='Z' || s[0]=='_' || s[0]=='$') )
   printf("no\n");
 else{
  for(j=0;j<strlen(s);j++){
   if( !(s[j]>='a'&&s[j]<='z' || s[j]>='A'&&s[j]<='Z' || s[0]=='_' || s[0]=='$' || s[j]>='0'&&s[j]<='9') ){
    printf("no\n");
    break;
   }
  }
  if(j==strlen(s))
    printf("yes\n");
 }
}
return 0;
}
int main()
{
	int i,j,n,k;
	char s[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{scanf("%s",s);
	k=0;
	for(j=0;s[j];j++){
		k++;}
	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))){
			break;}
	}
	if(j<k){
		printf("no\n");
	}else{printf("yes\n");}
	}
	return 0;
}
int main()
{
	int n,i,j,a;
	char zfc[1000][30];
	char m[100];
	gets(m);
	n=atoi(m);
	for(i=0;i<n;i++)
	{
		   gets(zfc[i]);
	}
	for(i=0;i<n;i++)
	{
		a=1;
		if((zfc[i][0]>='a'&&zfc[i][0]<='z')||(zfc[i][0]>='A'&&zfc[i][0]<='Z')||(zfc[i][0]=='_'))
		{
			1;
		}else{
		    a=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]=='_')||(zfc[i][j]>='0'&&zfc[i][j]<='9'))
			{
				1;
			}else{
			     a=0;
			}
		}
        if(a==0)
		{
			printf("no\n");
		}else if(a==1)
		{
			printf("yes\n");
		}
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d\n",&n);
	int i,j;
	for(i=0;i<n;i++)
	{
	    char s[100];
		gets(s);
		int r=0;
		if((s[0]<='z'&&s[0]>='a')||s[0]=='_'||(s[0]<='Z'&&s[0]>='A'))
		{
			for(j=1;s[j]!='\0';j++)
			{

			    char b;
			    b=s[j];
			    if((b<='z'&&b>='a')||(b<='Z'&&b>='A')||(b<='9'&&b>='0')||(b=='_'))
				{
				    r++;
				}
			    else
				{
			        printf("no\n");
			     	break;
				}
			}
		    if(s[j]=='\0')
			{
				printf("yes\n");
			}
		}
   	    else
		{
			printf("no\n");
		}
	}
	return 0;
}
int main()
{
	int n, i, j, flag;
	char str[100][20];
	cin >> n;
	for (i = 0; i < n; i ++)
	{
		flag = 0;
		cin >> str[i];
		if ((char)65 <= str[i][0] && str[i][0] <= (char)90 ||
			(char)97 <= str[i][0] && str[i][0] <= (char)122 ||
			str[i][0] == (char)95)
		{
			for (j = 1; j < strlen(str[i]); j ++)
			{
				if ((char)65 <= str[i][j] && str[i][j] <= (char)90 ||
					(char)97 <= str[i][j] && str[i][j] <= (char)122 ||
					(char)48 <= str[i][j] && str[i][j] <= (char)57 ||
					str[i][j] == (char)95)
					continue;
				else
				{
					cout << "no" << endl;
					flag = 1;
					break;
				}
			}
			if (flag == 0)
				cout << "yes" << endl;
		}
		else
			cout << "no" << endl;
	}
	return 0;
}
int main(){
int n,i,j,m=1;
char s[MAX+1];
scanf("%d",&n);
for(j=0;j<n;j++){
scanf("%s",s);

  for(i=0;s[i]!='\0';i++){
		if(!((s[i]=='_')||(s[i]>='A'&&s[i]<='Z')||(s[i]>='a'&&s[i]<='z')||(s[i]>='0'&&s[i]<='9'&&i>0))){
		m=0;
		break;
		}
		else{
			m=1;
		}
			
		}
  if(m==0){
				printf("no\n");
			}
			else if(m==1){
			printf("yes\n");
			}
}
return 0;
}
//
//  main.c
//  Track 79,???C???
//
//  Created by Charles.thRay.Lee on 2/1/13.
//  Copyright (c) 2013 Peking University. All rights reserved.
/*
 ??	???? ???? 06 ????? ????
 ??
 ??n????????????????????C?????????????????????C????????
 ????
 ??????n???n?????????????????????????????20?
 ????
 ?????????????C????????????yes?????no?
 ????
 6
GUE9NF1Ic
cGB8nd97F3
RKPEGX9R;TWyYcp
iefZIko1s}zy9XBg
sapOF3
6Lv5BYPeLPJ3vV`2[h
 ????
 yes
 
 yes
 
 no
 
 no
 
 yes
 
 no
 ??
 ??????????
 
 ??:???????????????? &#8226; ??:
 ??????????????,????????? ??????
 ?????(????)
 ???????(????????)  ??:????,??????32???
?:???????????
sum Sum M.D.John day Date 3days student_name #33 lotus_1_2_3
char a>b _above $123
*/


int main()
{
    int n,i,i1,k=1;
    long len;
    scanf("%d",&n);
    char s[500][20];
    
    for (i=0; i<n; i++) {
        scanf("%s",s[i]);
        k=1;
        if ((s[i][0]<'A'||s[i][0]>'Z')&&(s[i][0]<'a'||s[i][0]>'z')&&s[i][0]!='_') {
            printf("no\n");
            continue;
        }
        len=strlen(s[i]);
        for (i1=1; i1<len; i1++) {
            if ((s[i][i1]<'A'||s[i][i1]>'Z')&&(s[i][i1]<'a'||s[i][i1]>'z')&&s[i][i1]!='_'&&(s[i][i1]<'0'||s[i][i1]>'9'))
            {
                printf("no\n");
                k=0;
                break;
            }
        }
        if (k==1) {
            printf("yes\n");
        }
    }
    
}
int main(){
	int N,i,k,flag;
	char a[100];
	scanf("%d\n",&N);
	for(i=0;i<N;i++){
		gets(a);
		flag=1;
		if((a[0]=='_')||((a[0]>='A')&&(a[0]<='Z'))||((a[0]>='a')&&(a[0]<='z'))){
				for(k=1;k<strlen(a);k++){
					if((a[k]<'0')||((a[k]>'9')&&(a[k]<'A'))||((a[k]>'Z')&&(a[k]<'_'))||((a[k]>'_')&&(a[k]<'a'))||(a[k]>'z')){
						flag=0;
						break;
					}
				}
			}
		else flag=0;
		if(flag==0) printf("no\n");
		if(flag==1) printf("yes\n");
	}
	return 0;
}
int main(){
	char xulie[100][21];
	int i,j,n,c;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",&xulie[i]);
	for(i=0;i<n;i++){
		if((xulie[i][0]==95)||(xulie[i][0]>=65&&xulie[i][0]<=90)||(xulie[i][0]>=97&&xulie[i][0]<=122))
		for(j=1;j<strlen(xulie[i]);j++){
			if((xulie[i][j]>=33&&xulie[i][j]<=47)||(xulie[i][j]>=58&&xulie[i][j]<=64)||(xulie[i][j]>=91&&xulie[i][j]<=94)||(xulie[i][j]==96)||(xulie[i][j]>=123&&xulie[i][j]<=127))
			{
				c=0;
				break;
			}
			else
				c=1;
		}
		else
			c=0;
		if(c==1)
			printf("yes\n");
		if(c==0)
			printf("no\n");
	}
	return 0;
}
int main()
{
	int i,j,n,l,result[20];
	char a[20][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]=='_')||(a[i][j]>='0'&&a[i][j]<='9')))
				{
					result[i]=0;
				    break;
				}
				if(j==l-1)
				{
					result[i]=1;
				}
			}
		}
		else
		{
			result[i]=0;
		}
	}
	for(i=0;i<n;i++)
	{
		if(result[i]==0)
		{
			printf("no\n");
		}
		else
		{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
	int n,i,j,s[21];
	char zf[21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",&zf);
	for(j=0;zf[j];j++){
		if(!((zf[j]=='_')||
			(zf[j]>='a'&&zf[j]<='z')||
			(zf[j]>='A'&&zf[j]<='Z')||
			(zf[j]>='0'&&zf[j]<='9'&&j>0)))
			break;
	}
    printf(zf[j] ? "no\n":"yes\n"); 
	}
 return 0;
}
int main(int argc, char* argv[])
{
	int j,n,i;
	char s[32];
	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)))break;
		}
		if (s[j])
			printf ("no\n");
		else printf ("yes\n");
	}
	return 0;
}
int main () {
           int n,sz[100]={0};
           char s[max+1];
             scanf("%d",&n);
             for (int i=0;i<n;i++) {
                 scanf("%s",s);
                 for (int 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))) {
                      sz[i]=-1; break;
                      }
                 }
                 }
                 for (int p=0;p<n;p++) {
                     if (sz[p]==0) {
                                   printf("yes\n");
                                   } else {
                                          printf ("no\n");
                                          }
                 }
                 
 
             return 0;
            
             }
int main()
{
    int i, j, n;                
    char s[1000][MAX+1];               
    scanf("%d", &n);             
    for (i = 0; i < n; i++) {   
        scanf("%s", s[i]);  
	}
    for(i=0;i<n;i++){
        for (j = 0; s[i][j]; 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)))
                                                
                break;           
        }
        printf(s[i][j] ? "no\n":"yes\n"); 
    }  
    return 0;
}
int main()
{
    int n;
    char sr[100][100];
    int i,j,sum[100];
    scanf("%d",&n);
    for(i=0;i<n;i++) scanf("%s",sr[i]);
    for(i=0;i<n;i++){
              
                     for(j=1;sr[i][j]!='\0';j++){
                                      if(((sr[i][j]>='A'&&sr[i][j]<='Z')||(sr[i][j]>='a'&&sr[i][j]<='z')||(sr[i][j]>='0'&&sr[i][j]<='9')||(sr[i][j]=='_'))&&((sr[i][0]>='A'&&sr[i][0]<='Z')||(sr[i][0]>='a'&&sr[i][0]<='z')||(sr[i][0]=='_'))) sum[i]=1;
                                      else{
                                           sum[i]=0;
                                           break;
                                           }
                                      }
                      if(sum[i]==0) printf("no\n");
                      else printf("yes\n");
                      }                 
    
    return 0;
}
int main(){
  int n;
  scanf("%d",&n);
  for(int i=1;i<=n;i++){
    char zfc[21];
    scanf("%s",zfc);
    if((zfc[0]>='a'&&zfc[0]<='z')||(zfc[0]>='A'&&zfc[0]<='Z')||zfc[0]=='_'){
      int s;
      for(int k=1;zfc[k]!='\0';k++){
        if((zfc[k]>='a'&&zfc[k]<='z')||(zfc[k]>='A'&&zfc[k]<='Z')||zfc[k]=='_'||(zfc[k]>='0'&&zfc[k]<='9')){
          s=0;
        }else{
          s=1;
          break;
        }
      }
      if(s==0){
        printf("yes\n");
      }else if(s==1){
        printf("no\n");
      }
    }else{
       printf("no\n");
    }
   }
  return 0;
}
int main()
{
    char str[100];
    int i, len, n, hash=1;
    cin>>n;
    cin.get();
    while(n--)
    {
        hash=1;
        cin.getline(str,100);
        len=strlen(str);
        if((str[0]>='a' && str[0]<='z')||(str[0]>='A' && str[0]<='Z')||str[0]=='_')
        {        hash=1;
            for(i=1; i<len; i++)
            {
                if((str[i]>='a' && str[i]<='z')||(str[i]>='A' && str[i]<='Z'))
                    hash=1;
                else if((str[i]>='0' && str[i]<='9')||str[i]=='_'||str[i]=='('||str[i]==')')
                    hash=1;
                else
                {
                    hash=0;
                    break;
                }
            }
        }
        else hash=0;
        if(hash==1)
            cout<<"yes"<<endl;
        else
            cout<<"no"<<endl;
    }
    
    return 0;
    
}
int first(char p)
{
	int z=0;
	if(p=='_' || (p>='a' && p<='z') || (p>='A' && p<='Z'))
		z=1;
	return z;
}

int behind(char p)
{
	int z=0;
	if(p=='_' || (p>='a' && p<='z') || (p>='A' && p<='Z') || p=='0' || (p>='1' && p<='9'))
		z=1;
	else
		z=0;
	return z;
}

int main()
{
	char *p;
	int *tf;
	int n,i,j,len;
	scanf("%d",&n);
	p=(char*)malloc(sizeof(int)*25);
	tf=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%s", p);
		len=strlen(p);
		tf[i]=1;
		if(first(p[0])==0)
		{
			tf[i]=0;
			continue;
		}
		for(j=1;j<len;j++)
		{
			if(behind(p[j])==0)
			{
				tf[i]=0;
				break;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		if(tf[i]==0)
			printf("no\n");
		if(tf[i]==1)
			printf("yes\n");
	}	
	free(p);
	return 0;
}
int main()
{
    int n,i,j,k,p,m;
    char a[20][25];
    scanf("%d", &n);
    for(i=1;i<=n;i++)
    {
                     m=0;
                     scanf("%s", a[i]);
                     p=strlen(a[i]);
                     k=a[i][0];
                     if(k==95||(k>=65&&k<=90)||(k>=97&&k<=122))
                     {
                             for(j=1;j<=p-1;j++)
                             {
                                               k=a[i][j];
                                               if(k<=47||(k>=58&&k<=64)||(k>=91&&k<=94)||k==96||k>=123)
                                               {
                                                        printf("no\n");
                                                        m=1;
                                                        break;
                                               }
                             }
                     }
                     else {printf("no\n"); m=1;}
                     if(m==0) printf("yes\n");
    }
    return 0;
}
int main(){
    int n,i,k,a;
    char sz[10000];
	scanf("%d",&n);
	for(k=0;k<n;k++){
	   scanf("%s",sz);
        a=0;
	   for(i=0;i<strlen(sz);i++){
	   if(((sz[i]>='0')&&(sz[i]<='9'))||((sz[i]>='a')&&(sz[i]<='z'))||((sz[i]>='A')&&(sz[i]<='Z'))||(sz[i]=='_')){
	      a=a+1;
	   }
	}
      if((sz[0]>='0')&&(sz[0]<='9')){
           a=0;
       }
    if(a==strlen(sz)){
        printf("yes\n");
    }
    else{
        printf("no\n");
    }
	   }
	return 0;
}
void main()
{
int n;
char c[1000];
int i,j;
int dd=1;
int len;
scanf("%d",&n);


for(i=0;i<n;i++)
{
	dd=1;
scanf("%s",c);
len=strlen(c);

if(c[0]!=95&&((c[0]<=64||c[0]>=123)||(c[0]<=96&&c[0]>=91)))
{dd=0;}
if((c[0]>64&&c[0]<91)||(c[0]>96&&c[0]<123))
{

for(j=1;j<len;j++)
{

if(c[j]!=95&&(c[j]<48||c[j]>57)&&((c[j]<=64||c[j]>=123)||(c[j]<=96&&c[j]>=91)))
{
dd=0;
break;
}

}


}

if(dd==1)
printf("yes\n");
else
printf("no\n");

}



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

}
int main(){
    int i,j,n,len;
    scanf("%d",&n);
    char zfc[100][21];
    for(i=0;i<n;i++){
   scanf("%s",zfc[i]);
}
     int s=0;
     for(i=0;i<n;i++){
len=strlen(zfc[i]);
s=0;

for(j=1;j<len;j++){
s=s+panduan(zfc[i][j]);
}     
       if(
((zfc[i][0]>='a'&&zfc[i][0]<='z')||(zfc[i][0]>='A'&&zfc[i][0]<='Z')||zfc[i][0]=='_')&&

(s==0)
){
            printf("yes\n");
        }
       else{
            printf("no\n");
        }
    }
    return 0;
}
int main()  {
   int i,x,m,n,b,c;
   char a[21];
   scanf("%d",&n);
   for(m=0;m<n;m++){
   scanf("%s",a);
   x=strlen(a);
   if((a[0]=='_')||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')){
   b=0;
   }  else {
   b=1;}
   for(i=1;i<x;i++) {
   if((a[i]=='_')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')||(a[i]>='0')&&a[i]<='9')
   {c=0;}
   else {c=1;break;}}
   if(b==1||c==1) {printf("no\n");}
   else{printf("yes\n");}
 }
   return 0 ;
 }
int main(){
int n,len;
scanf("%d",&n);
char a[100][20],b[20];
int i,k,flag;
for(i=0;i<n;i++){
	scanf("%s",a[i]);
}
for(i=0;i<n;i++){
	strcpy(b,a[i]);
	flag=1;

	len=strlen(b);
    if((b[0]>='A'&&b[0]<='Z')||(b[0]>='a'&&b[0]<='z')||(b[0]=='_')){
		for(k=1;k<len;k++){
			if((b[k]>='A'&&b[k]<='Z')||(b[k]>='a'&&b[k]<='z')||(b[k]=='_')||(b[k]>='0'&&b[k]<='9')){
              flag=1;
			}else{
				flag=0;
				break;
			}
		}
		if(flag==0){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}else{
		printf("no\n");
	}
}
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i,m,j,k=1,l=0;
	char c[20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",c);
		m=strlen(c);
		for(j=0;j<m;j++)
		{
			if((((c[j]>='0')&&(c[j]<='9'))||((c[j]>='a')&&(c[j]<='z'))||((c[j]>='A')&&(c[j]<='Z'))||(c[j]=='_'))&&(((c[0]>='a')&&(c[0]<='z'))||((c[0]>='A')&&(c[0]<='Z'))||(c[0]=='_')))
				continue;
			else
			{
				k=0;
				break;
			}
		}  
		if(k==1)
		{
			if(l==0)
			{
				printf("yes");
				l=1;
			}
			else
			printf("\nyes");
		}
		else
		{
			if(l==0)
			{
				printf("no");
				l=1;
			}
			else
			printf("\nno");
		}
		k=1;
	}
	return 0;
}
int main(){
 int n,i,c,g;
 char a[20][21];
 scanf("%d",&n);
 for(i=0;i<=n-1;i++){
  scanf("%s",a[i]);
 }
 for(c=0;c<=n-1;c++){
   if((a[c][0]<65)||(a[c][0]>90&&a[c][0]<95)||(a[c][0]==96)||(a[c][0]>122)){
     puts("no");
	 continue;
	}else{
   for(g=0;g<strlen(a[c]);g++){
    if((a[c][g]<48)||(a[c][g]>57&&a[c][g]<65)||(a[c][g]>90&&a[c][g]<95)||(a[c][g]==96)||(a[c][g]>122)){
    puts("no");
	break;
    }
    if((g==strlen(a[c])-1)&&((a[c][g]==95)||(a[c][g]>=65&&a[c][g]<=90)||(a[c][g]>=97&&a[c][g]<=122)||(a[c][g]>=48&&a[c][g]<=57))){
    puts("yes");
	}
   }
  }
 }
 return 0;
}
int s(char n)
{
    if(('a'<=n&&n<='z')||('A'<=n&&n<='Z')||n=='_')
        return 1;
    else return 0;
}
int f(char n)
{
    if(('a'<=n&&n<='z')||('A'<=n&&n<='Z')||n=='_'||('0'<=n&&n<='9'))
        return 1;
    else return 0;
}
int main()
{
    int i,j,n,fl;
    char w[30];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        int fl=1;
        scanf("%s",w);
        if(!s(w[0]))fl=0;
        for(j=1;j<strlen(w);j++)if(!f(w[j]))fl=0;
        fl?printf("yes\n"):printf("no\n");
    }
        return 0;
}
int main()
{
    char a[30][30];
    int n,j,k,i,t;
    scanf("%d",&n);
    gets(a[1]);  
    for(i=0;i<n;i++)
    {
      gets(a[i]);                 
      k=strlen(a[i]);    
      t=0     ;  
    for(j=0;j<=k;j++)
    { 
     if(a[i][0]>='0'&&a[i][0]<='9')  break;
     if(a[i][j]<='9'&&a[i][j]>='0') t++;
     if(a[i][j]<='z'&&a[i][j]>='a') t++;
     if(a[i][j]<='Z'&&a[i][j]>='A') t++;
     if(a[i][j]=='_')   t++;            
     } 
     if(t==k) printf("yes\n");
     else printf("no\n");
    }
}
int main(){
    char bz[50];
    int n,i,j,l;
    scanf("%d",&n);
    for(i=0;i<n;i++){
		scanf("%s",bz);
		l=strlen(bz);
		for(j=0;j<l;j++){
			if(j==0){
				if(!((bz[j]>='a'&&bz[j]<='z')||(bz[j]>='A'&&bz[j]<='Z')||bz[j]=='_')){
					printf("no\n");
					break;
				}
			}
			else{
			if(!((bz[j]>='a'&&bz[j]<='z')||(bz[j]>='A'&&bz[j]<='Z')||bz[j]=='_'||(bz[j]>='0'&&bz[j]<='9'))){
					printf("no\n");
					break;
			}
			}
		}
	if(j==l){
		printf("yes\n");
	}

	}

    return 0;
    }
int main(){
 int i,n,pd,j;
 char zc[50];
 scanf("%d",&n);
 for(i=0;i<n;i++){
  scanf("%s",zc);
  for(j=0;j<strlen(zc);j++){
	  if(zc[0]>47&&zc[0]<58){
	   pd=0;
       break;
	
  }
	
  if((zc[j]>47&&zc[j]<58)||(zc[j]>64&&zc[j]<91)||(zc[j]>96&&zc[j]<123)||(zc[j]==95)){
	
  pd=1;
	
  }else{
	
  pd=0;
	
  break;
	
  }
  }if(pd==1){
 printf("yes\n");
  }else if(pd==0){
printf("no\n");
  }

 }
 return 0;
}
int main()
{
	int a,b,c,d,e,i,j;
	char z[21];
	scanf("%d",&a);
	for(i=0;i<a;i++)
	{
		scanf("%s",z);
		b=isalpha(z[0]);
		j=strlen(z);
		c=1;
		if((b==0)&&(z[0]!='_'))
		{
			printf("no\n");
			continue;
		}
		for(d=1;d<j;d++)
		{
			e=isalnum(z[d]);
			if((e==0)&&(z[d]!='_'))
			{
				c=0;
				break;
			}
		}
		if(c)
		{
			printf("yes\n");
		}
		else
		{
			printf("no\n");
		}
	}
	return 0;
}
int main(){
	int n,d;
	char a[100][21];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%s",a[i]);
	}
	for(int k=0;k<n;k++){
		for(int j=0;j<' ';j++){
            d=strlen(a[k]);
			if((a[k][j]>='a'&&a[k][j]<='z')||(a[k][j]>='0'&&a[k][j]<='9')||(a[k][j]=='_')||(a[k][j]>='A'&&a[k][j]<='Z')||a[k][j]=='0'){
				if(j==0){
					if(a[k][j]>='0'&&a[k][j]<='9'){
						printf("no\n");
						break;
					}
				}
			}else{
				printf("no\n");
				break;
			}
		if(j==d-1){
			   printf("yes\n");
			   break;
			}
		}
	}
	return 0;
}
int main()
{
    char s[100];
    int n, k, m, i, j;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>s;
        for(j=0;s[j]!='\0';j++)
        {
            if(j==0)
            {
                if(s[j]=='_'||(s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z'))
                continue;
                else
                {
                    cout<<"no"<<endl;
                    break;         
                }
            }
            if(j>0)
            {
                if(s[j]=='_'||(s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||(s[j]>='0'&&s[j]<='9'))
                {
                if(s[j+1]=='\0')
                    cout<<"yes"<<endl;
                continue;
                }
                else
                {
                    cout<<"no"<<endl;
                    break;                                
                }
            }
        }
    }
	return 0;
}
int main(){
int num,im,jm,tm,len;
scanf("%d",&num);
char zfc[num][21];
    for(im=0;im<num;im++){
        tm=0;
        scanf("%s",zfc[im]); 
        len=strlen(zfc[im]);
        if((zfc[im][0]>='a'&&zfc[im][0]<='z')||(zfc[im][0]>='A'&&zfc[im][0]<='Z')||(zfc[im][0]=='_')){
        for(jm=1;jm<len;jm++){
            if((zfc[im][jm]>='a'&&zfc[im][jm]<='z')||(zfc[im][jm]>='A'&&zfc[im][jm]<='Z')||(zfc[im][jm]>='0'&&zfc[im][jm]<='9')||(zfc[im][jm]=='_')){} else {tm++;break;}
        } 
        if(tm==0){printf("yes\n");} else {printf("no\n");}
        } else {printf("no\n");}
    }
return 0;
}
int main(){
      int n,e;
      scanf("%d",&n);
      char zfc[n][21];
      for(int i=0;i<n;i++){
          scanf("%s",zfc[i]);
      }
      for(int i=0;i<n;i++){
          e=strlen(zfc[i]);
          if((zfc[i][0]!='_')&&(zfc[i][0]>'Z'||zfc[i][0]<'A')&&(zfc[i][0]>'z'||zfc[i][0]<'a')){printf("no\n");}
          else{
              int t=0;
         for(int m=1;m<e;m++){
             if((zfc[i][m]=='_')||(zfc[i][m]>='a'&&zfc[i][m]<='z')||(zfc[i][m]>='A'&&zfc[i][m]<='Z')||(zfc[i][m]>='0'&&zfc[i][m]<='9')){
                 t++; 
             }
         } 
         if(t==e-1){printf("yes\n");}
         else{printf("no\n");}
         }
      }
       
      return 0;
      
  }
int main()
{
	int n,i,a,b,j;
	char zfc[100][21],num[100];
	gets(num);
	n=atoi(num);
	for(i=0;i<n;i++){
		gets(zfc[i]);
	}
	for(i=0;i<n;i++){
		a=strlen(zfc[i]);
		b=0;
		for(j=0;j<a;j++){
			if(zfc[i][j]=='_'||zfc[i][j]>='a'&&zfc[i][j]<='z'||zfc[i][j]>='A'&&zfc[i][j]<='Z'||zfc[i][j]>='0'&&zfc[i][j]<='9') b++;
			if(j==0&&zfc[i][j]>='0'&&zfc[i][j]<='9') b--;
		}
		if(b==a) 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 str[80];
        cin.getline(str,80);
        int j=0;
            if(!((str[0]>='a'&&str[0]<='z')||(str[0]>='A'&&str[0]<='Z')||str[0]=='_'))
            cout<<"no"<<endl;
            else
            {
        for(j=1;str[j]!='\0';j++)
        {
            if(!((str[j]>='a'&&str[j]<='z')||(str[j]>='A'&&str[j]<='Z')||(str[j]>='0'&&str[j]<='9')||str[j]=='_'))
            {
            cout<<"no"<<endl;
            break;
            }
        }
        if(str[j]=='\0')
        cout<<"yes"<<endl;
            }
    }
   
    return 0;
}
int main ()
{
	char a[20];
	int i,j;
	int n;
	scanf("%d",&n);
	int judge=0;
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		strlen(a);
		int m;
		m=strlen(a);
		for(j=0;j<m;j++)
		{   
			judge=0;
			if(j==0)
			{
				if(a[j]=='_'||(a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z'))
					judge=1;
			}
			else
			{
				if(a[j]=='_'||(a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z')||(a[j]>='0'&&a[j]<='9'))
				{
					judge=1;
				}
				
			}
			if(judge==0)
				break;
			
		}
		if(judge==1)
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
int main(){
	int n=0,k;
	char suoyou[1000][21];
	scanf("%d\n",&n);
	int i=0,jieguo[1000];
	for(i=0;i<n;i++){
		gets(suoyou[i]);
	}
	for(i=0;i<n;i++){
		jieguo[i]=0;
	}


	for(i=0;i<n;i++){
		if((suoyou[i][0]<65)||((suoyou[i][0]>90)&&(suoyou[i][0]<97)&&(suoyou[i][0]!=95))||(suoyou[i][0]>122)){
			jieguo[i]=1;
		}else{
			for(k=0;k<strlen(suoyou[i]);k++){
				if((suoyou[i][k]<48)||((suoyou[i][k]>57)&&(suoyou[i][k]<65))||((suoyou[i][k]>90)&&(suoyou[i][k]<95))||((suoyou[i][k]>95)&&(suoyou[i][k]<97))||(suoyou[i][k]>122)){
					jieguo[i]=1;
				}
			}
		}
	}
		for(i=0;i<n;i++){
			if(jieguo[i]!=0)
				printf("no\n");
			else
				printf("yes\n");
		}
		return 0;
}