semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	char s[21];
	int n,j,i,c=0,l;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",s);
		l=strlen(s);
		for(j=1;j<l;j++){
			if((s[j]=='_')||(s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9')){
				c++;
			}
		}
		if((s[0]=='_')||(s[0]>='a'&&s[j]<='z')||(s[0]>='A'&&s[j]<='Z')){
			c++;
		}
		if(c==l){
			printf("yes\n");
		}else{
			printf("no\n");
		}
		c=0;
	}
	return 0;
}
int main()
{
	int n, i, j, temp;
	char s[21];
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> s;
		temp = 0;
		if ((s[0] != '_') && ((s[0]>'z') || (s[0] < 'a')) && ((s[0]<'A') || (s[0]>'Z')))
		{
			cout << "no" << endl;
			continue;
		}
		for (j = 1; j < strlen(s); j++)
		{
			if ((s[j] != '_') && ((s[j]>'z') || (s[j] < 'a')) && ((s[j]<'A') || (s[j]>'Z')) && ((s[j]<'0') || (s[j]>'9')))
			{
				cout << "no" << endl;
				temp = 1;
				break;
			}
		}
		if (temp == 0)
			cout << "yes" << endl;
	}
	return 0;
}
void main()
{
	int n,i,j,z,len;
	char c[1000][20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",c[i]);
	for(i=0;i<n;i++)
	{
		z=0;
		if((c[i][0]<'A')||(c[i][0]>'Z'&&c[i][0]<'_')||(c[i][0]==96)||(c[i][0]>'z'))
		{
			printf("no\n");
			continue;
		}
		len=strlen(c[i]);
		for(j=1;j<len;j++)
		{
			if((c[i][j]<'0')||(c[i][j]>'9'&&c[i][j]<'A')||(c[i][j]>'Z'&&c[i][j]<'_')||(c[i][j]==96)||(c[i][j]>'z'))
			{
				printf("no\n");
				z=1;
				break;
			}
		}
		if(z!=1)
        printf("yes\n");
	}
}
int main(){
	int n,i,j,a[100],len[100];
	char zfc[100][20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zfc[i]);
		len[i]=strlen(zfc[i]);
	}
	for(i=0;i<n;i++){
		a[i]=0;
		for(j=0;zfc[i][j]!=0;j++){
			if(((zfc[i][0]<='z'&&zfc[i][0]>='a')||(zfc[i][0]<='Z'&&zfc[i][0]>='A')||(zfc[i][0]=='_'))&&((zfc[i][j]<='z'&&zfc[i][j]>='a')||(zfc[i][j]<='Z'&&zfc[i][j]>='A')||(zfc[i][j]<='9'&&zfc[i][j]>='0')||zfc[i][j]=='_')){
				a[i]++;
			}else{
				a[i]+=2;
			}
		}
	}
	for(i=0;i<n;i++){
		if(a[i]==len[i]){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
//?? C ???

//??????
int isKeyWord(char* str)
{
	int i;
	char *keyword[]=
					{
						"auto", "break", "case", "char", "const", "continue", "default",
						"do", "double", "else", "enum", "extern", "float", "for", "goto",
						"if", "int", "long", "register", "return", "short", "signed", 
						"sizeof", "static", "struct", "switch", "typedef", "union", "unsigned",
						"void", "volatile", "while"
					};
	
	for (i = 0; i < 32; i++)
	{
		if (strcmp(str, keyword[i]) == 0)
			return 1;
			
	}
	return 0;	
}

//??????C?????
int islegalIdentifier(char* str)
{
	char* p = str;
	if (isKeyWord(str))
		return 0;

	if (!((*p >= 'a' && *p <='z') || (*p >= 'A' && *p <='Z') || (*p == '_')))
		return 0;

	while (*p != '\0')
	{
		if (!((*p >= 'a' && *p <='z') || (*p >= 'A' && *p <='Z') || (*p == '_') || (*p >= '0' && *p <='9')))
			return 0;
		p++;
	}
	return 1;
}

int main()
{
	char buffer[21];
	int n, i;
	scanf("%d", &n);
	gets(buffer);

	for (i = 0; i < n; i++)
	{
		gets(buffer);
		if (islegalIdentifier(buffer))
			puts("yes");
		else
			puts("no");
	}

	return 0;
}
int main()
{
	int n,i,j,bfh[100]={0},sz[100];
	 char zf[100][21];
	 scanf("%d",&n);
	 for(i=0;i<n;i++)
		{
			scanf("%s",zf[i]);
			sz[i]=strlen(zf[i]);
	    }
	 for(i=0;i<n;i++) 
	 {
      for(j=0;j<sz[i];j++)
	    {
			if(zf[i][j]!='a'&&zf[i][j]!='b'&&zf[i][j]!='c'&&zf[i][j]!='d'&&zf[i][j]!='e'&&zf[i][j]!='f'&&zf[i][j]!='g'&&zf[i][j]!='h'&&
				zf[i][j]!='i'&&zf[i][j]!='j'&&zf[i][j]!='k'&&zf[i][j]!='l'&&zf[i][j]!='m'&&zf[i][j]!='n'&&zf[i][j]!='o'&&zf[i][j]!='p'&&
				zf[i][j]!='q'&&zf[i][j]!='r'&&zf[i][j]!='s'&&zf[i][j]!='t'&&zf[i][j]!='u'&&zf[i][j]!='v'&&zf[i][j]!='w'&&zf[i][j]!='x'&&
				zf[i][j]!='y'&&zf[i][j]!='z'&&zf[i][j]!='A'&&zf[i][j]!='B'&&zf[i][j]!='C'&&zf[i][j]!='D'&&zf[i][j]!='E'&&zf[i][j]!='F'&&
				zf[i][j]!='G'&&zf[i][j]!='H'&&zf[i][j]!='I'&&zf[i][j]!='J'&&zf[i][j]!='K'&&zf[i][j]!='L'&&zf[i][j]!='M'&&zf[i][j]!='N'&&
				zf[i][j]!='O'&&zf[i][j]!='P'&&zf[i][j]!='Q'&&zf[i][j]!='R'&&zf[i][j]!='S'&&zf[i][j]!='T'&&zf[i][j]!='U'&&zf[i][j]!='V'&&
				zf[i][j]!='W'&&zf[i][j]!='X'&&zf[i][j]!='Y'&&zf[i][j]!='Z'&&zf[i][j]!='0'&&zf[i][j]!='1'&&zf[i][j]!='2'&&zf[i][j]!='3'&&
				zf[i][j]!='4'&&zf[i][j]!='5'&&zf[i][j]!='6'&&zf[i][j]!='7'&&zf[i][j]!='8'&&zf[i][j]!='9'&&zf[i][j]!='_')
				bfh[i]=1;
	    }
	 }
	 for(i=0;i<n;i++) 
	 {
		 if(zf[i][0]=='0'||zf[i][0]=='1'||zf[i][0]=='2'||zf[i][0]=='3'||zf[i][0]=='4'||
			 zf[i][0]=='5'||zf[i][0]=='6'||zf[i][0]=='7'||zf[i][0]=='8'||zf[i][0]=='9')
         printf("no\n");
		 else if (bfh[i]==1)
		 printf("no\n");
		 else
			 printf("yes\n");		 
	 }
	 return 0;
}
int main()
{
	int i,n,j,panduan=1;
	char s[100][100];
    scanf("%d",&n);
	for(i=0;i<n;i++)
	{
    	scanf("%s",s[i]);
	}
	for(i=0;i<n;i++)
	{
	panduan=1;	
int m=strlen(s[i]);
		for(j=0;j<m;j++)
		{
			if(j==0)
			{
				if((s[i][j]>='a')&&(s[i][j]<='z'))
				{
				   continue;
				}
			    else if((s[i][j]>='A')&&(s[i][j]<='Z'))
				{
				   continue;
				}
                else if(s[i][j]=='_')
				{
				   continue;
				}
				else
				{
					panduan=0;
					break;
				}
			}
			else
			{
                 if((s[i][j]>='0')&&(s[i][j]<='9'))
				 {
				    continue;
				 }
			     else if((s[i][j]>='a')&&(s[i][j]<='z'))
				 {
			       	continue;
				 }
			     else if((s[i][j]>='A')&&(s[i][j]<='Z'))
				 {
				    continue;
				 }
			     else if(s[i][j]=='_')
				 {
				    continue;
				 }
				 else
				 {
					 panduan=0;
					 break;
				 }
			}
		}

		if(panduan==1)
		{
			   printf("yes\n");
		}
		else if(panduan==0)
		{
			   printf("no\n");
		}
		
	}
		

	return 0;
}
/* Note:Your choice is C IDE */
void main()
{
    int n,i=1,j=0,len,M=0;
    char A[21];
    scanf("%d",&n);
    scanf("\n");
  while(i<=n)
  {
  	gets(A);
  	len=strlen(A);
  	if((A[j]>='A'&&A[j]<='Z')||(A[j]>='a'&&A[j]<='z')||A[j]=='_')
  	 {
  	 	M++;
  	    for(j=1;j<=len-1;j++)
  	      {
  		     if((A[j]>='A'&&A[j]<='Z')||(A[j]>='a'&&A[j]<='z')||(A[j]>='0'&&A[j]<='9')||A[j]=='_') M++;
  	      }
  	      if(M==len) printf("yes\n");
  	      else printf("no\n");
  	 }
  	 else printf("no\n");
  	 i++;
  	 M=0;
  	 j=0;
  }
}
int main()
{
	int n,i,j,len;
	char s[30],t;
	scanf("%d%c",&n,&t);
	for(i=0;i<n;i++)
	{
		gets(s);
		len=strlen(s);
		for(j=0;j<len;)
		{
			if(s[j]>='0' && s[j]<='9' || s[j]>='a' && s[j]<='z' || s[j]>='A' && s[j]<='Z' || s[j]=='_')
				j++;
			else
				break;
		}
		if(j==len)
		{
			if(s[0]>='0' && s[0]<='9')
				printf("no\n");
			else
				printf("yes\n");
		}
		else
			printf("no\n");
	}
	return 0;
}
int main()
{
	int n,i,j,t,len[2000]={0};
	char str[200][200];
	scanf("%d",&n);
	scanf("\n");
	for(i=0;i<n;i++)
	{
		gets(str[i]);
		len[i]=strlen(str[i]);
	}
	for(i=0;i<n;i++)
	{
		if((('a'<=str[i][0])&&(str[i][0]<='z'))||(('A'<=str[i][0])&&(str[i][0]<='Z'))||str[i][0]=='_')
		{
			for(j=0;j<len[i];j++)
			{
				if((('a'<=str[i][j])&&(str[i][j]<='z'))||(('A'<=str[i][j])&&(str[i][j]<='Z'))||str[i][j]=='_'||(('0'<=str[i][j])&&(str[i][j]<='9')))
				{
					t=0;
				}
				else
				{
					t=1;
					break;
				}
			}
		}
		else 
		{
			t=1;
		}
		if(t==0)
		{
			printf("yes\n");
		}
		else if(t==1)
		{
			printf("no\n");
		}
	}
	
	return 0;		
}
int main(){
int n,i,m,result=0;
char bsf[1000][21];
scanf("%d",&n);
 for(i=0;i<n;i++){
    scanf("%s",bsf[i]);
 }
  for(i=0;i<n;i++){
    if(((bsf[i][0]>='a')&&(bsf[i][0]<='z'))||((bsf[i][0]>='A')&&(bsf[i][0]<='Z'))||(bsf[i][0]=='_')){
      for(m=1;bsf[i][m]!='\0';m++){
        if(((bsf[i][m]>='a')&&(bsf[i][m]<='z'))||((bsf[i][m]>='0')&&(bsf[i][m]<='9'))||((bsf[i][m]>='A')&&(bsf[i][m]<='Z'))||(bsf[i][m]=='_')) {
        }
        else{
            result=1;
        }
      }
    }
     else{
          result=1;
      }
   if(result==0){printf("yes\n");}else{printf("no\n");};
  result=0;
  }
 return 0;
}
int main()
{
	int	n;
	char**	p;
	int	i;
	int	j;
	int	k;
	scanf("%d", &n);
	p = (char**)malloc(sizeof(char*) * n);
	for (i=0; i<n; i++)
		p[i] = (char*) malloc(sizeof(char) * 21);
	for (i=0; i<n; i++)
		scanf("%s", p[i]);
	for (i=0; i<n; i++)
	{
		k = 1;
		if ( (p[i][0] >= 'A' && p[i][0] <= 'Z')
			|| (p[i][0] >= 'a' && p[i][0] <= 'z' )
			|| p[i][0] == '_')
		{
			for (j=1; j<strlen(p[i]); j++)
				if ( p[i][j] < '0'
					|| (p[i][j] > '9' && p[i][j] < 'A')
					|| (p[i][j] > 'Z' && p[i][j] < '_')
					|| (p[i][j] > '_' && p[i][j] < 'a')
					|| (p[i][j] > 'z'))
				{
					k = 0;
					break;
				}
		}
		else k = 0;
		printf("%s", k == 1 ? "yes\n" : "no\n");
	}
	return 0;
}
int main(){
int n,i,p,b;
char a[22];
scanf("%d",&n);
for(i=0;i<n;i++){
   scanf("%s",a);
   b=strlen(a);

   for(p=0;p<b;p++){
       if((a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')||a[0]=='_'){
          if(a[p]=='_'||(a[p]>='a'&&a[p]<='z')||(a[p]>='A'&&a[p]<='Z')||(a[p]>='0'&&a[p]<='9')){
              if(p==b-1){
                  printf("yes\n");
                  break;
              }else{
           continue;
              }
          }else{
           printf("no\n");
           break;
          }
      }else{
          printf("no\n");
          break;
      }

}
}
return 0;
}
int main()
{
	
	int n;
	cin>>n;
	cin.get();//??n??????????
	char a[100];
	for(int i=0;i<n;i++)
	{
		cin.getline(a,90);//????????
		int x=strlen(a);
		int counter=0;
		for(int j=0;j<x;j++)
		{
			if(j==0&&((a[j]>='A'&&a[j]<='Z') || ( a[j]>='a'&&a[j]<='z') || a[j]=='_'))counter=0;//??????????
			else if( j!=0&&( (a[j]>='0'&&a[j]<='9') || (a[j]>='A'&&a[j]<='Z') || ( a[j]>='a'&&a[j]<='z') || a[j]=='_'))counter=0;
			else {counter=1;break;}
		}
		if(counter==0)cout<<"yes"<<endl;
		else cout<<"no"<<endl;
	}
	return 0;
}
int main(){
    int i,j,n,s=0;
    char name;
    scanf("%d",&n);
        name=getchar();
    for(i=0;i<n;i++)
    {
        s=0;
        name=getchar();
        if(('1'<=name && name<='9') || name=='0')
            s+=1;
        do{

            if(('a'<=name&&name<='z') ||( 'A'<=name&&name<='Z') || name=='_' || ('1'<=name && name<='9' )||'0'==name)
            {    s+=0;
         //        printf("0");
         }
            else
            {
                s+=1;
         //       printf("1");
            }
            name=getchar();
        }while(name!='\n');
        printf("\n");
        if(s==0)
           printf("yes\n");
        else
           printf("no\n");
        
    }
    

    return 0;    
}
int main(){
char zf[LEN][LEN];
int a,n,i=0,j;
scanf("%d",&n);
for(i=0;i<n;i++){
		scanf("%s",zf[i]);
	}
for(i=0;i<n;i++){
	a=strlen(zf[i]);
	if((zf[i][0]>=48 && zf[i][0]<=57)){
			printf("no\n");	}
	if((zf[i][0]>=0 &&zf[i][0]<=47)||(zf[i][0]>=58 && zf[i][0]<=64)||(zf[i][0]>=91 && zf[i][0]<=94)||(zf[i][0]==96)||(zf[i][0]>=123 && zf[i][0]<=127)){
	printf("no\n");
	}
	else if(zf[i][0]<48 ||zf[i][0]>57){
		for(j=0;j<a;j++){
			if((zf[i][j]>47 &&zf[i][j]<58)||(zf[i][j]>64 && zf[i][j]<91)||(zf[i][j]==95)||(zf[i][j]>96 && zf[i][j]<123)){
				continue;

}
			if((zf[i][j]>=0 &&zf[i][j]<=47)||(zf[i][j]>=58 && zf[i][j]<=64)||(zf[i][j]>=91 && zf[i][j]<=94)||(zf[i][j]==96)||(zf[i][j]>=123 && zf[i][j]<=127)){
				printf("no\n");
				break;
			}
			
			}

	if(j==a){
	printf("yes\n");
	}
	}	

}
return 0;
}
void main()
{
	int n,i,j,l,len;
	char c[100][100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",c[i]);
	for(i=0;i<n;i++)
	{
		l=0;
		len=strlen(c[i]);
		if(c[i][0]>='a' && c[i][0]<='z')
			l=l;
		else if(c[i][0]>='A' && c[i][0]<='Z')
			l=l;
		else if(c[i][0]=='_')
			l=l;
		else
			l++;
		for(j=1;j<len;j++)
		{
			if(c[i][j]>='a' && c[i][j]<='z')
				l=l;
			else if(c[i][j]>='A' && c[i][j]<='Z')
				l=l;
			else if(c[i][j]=='_')
				l=l;
			else if(c[i][j]>='0' && c[i][j]<='9')
				l=l;
			else l++;
		}
		if(l!=0)
			printf("no\n");
		else printf("yes\n");
	}
}
int main(){
	char name[30][25];
	int i,j,n,t[30];
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%s",&name[i]);
	t[i]=0;
	}
	for(j=0;j<n;j++){
		i=0;
		if(i==0){
			if((name[j][i]>=30&&name[j][i]<=64)||(name[j][i]>=91&&name[j][i]<=94)||name[j][i]==96||name[j][i]>=123){
			   t[j]=1;
			}
		}
	    for(i=1;name[j][i]!='\0';i++){
			if((name[j][i]>=30&&name[j][i]<=47)||(name[j][i]>=58&&name[j][i]<=64)||(name[j][i]>=91&&name[j][i]<=94)||name[j][i]==96||name[j][i]>=123){
			t[j]=1;
			}
		}   
	}
	for(j=0;j<n;j++){
		if(t[j]==1){
	    printf("no\n");
		}
		else{
		printf("yes\n");
		}
	}
return 0;
}
int main()
{
	int n,m;
	char A[80];
	cin>>n;
	gets(A);
    for(int i=0;i<n;i++)
	{
		gets(A);
		m=strlen(A);
		int g=0;
		for(int j=0;j<m;j++)
		{
			if(!(A[j]>='a'&&A[j]<='z'||A[j]>='A'&&A[j]<='Z'||A[j]=='_'||A[j]>='0'&&A[j]<='9')||A[0]>='0'&&A[0]<='9')
				g=1;
		}
		if(g==1)
			cout<<"no"<<endl;
		else
			cout<<"yes"<<endl;
    }
	return 0;
}
int change(char m)
{
 int n;
 switch(m)
  {
   case '0':n=0;break;
   case '1':n=0;break;
   case '2':n=0;break;
   case '3':n=0;break;
   case '4':n=0;break;
   case '5':n=0;break;
   case '6':n=0;break;
   case '7':n=0;break;
   case '8':n=0;break;
   case '9':n=0;break;
   case'A':n=0;break;
     case'B':n=0;break;
     case'C':n=0;break;
     case'D':n=0;break;  
     case'E':n=0;break;
     case'F':n=0; break;    
     case'G':n=0;break;
     case'H':n=0;break;        
     case'I':n=0;break;
     case'J':n=0;break;     
     case'K':n=0;break;
     case'L':n=0;break;         
     case'M':n=0;break;
     case'N':n=0;break;     
     case'O':n=0;break;        
     case'P':n=0;break;
     case'Q':n=0;break;    
     case'R':n=0;break;
     case'S':n=0;break;        
     case'T':n=0;break;
     case'U':n=0;break;
     case'V':n=0;break;
     case'W':n=0;break;      
     case'X':n=0;break;
     case'Y':n=0;break;   
     case'Z':n=0;break; 
     case'a':n=0;break;
     case'b':n=0;break;
     case'c':n=0;break;
     case'd':n=0;break;  
     case'e':n=0;break;
     case'f':n=0; break;    
     case'g':n=0;break;
     case'h':n=0;break;        
     case'i':n=0;break;
     case'j':n=0;break;     
     case'k':n=0;break;
     case'l':n=0;break;         
     case'm':n=0;break;
     case'n':n=0;break;     
     case'o':n=0;break;        
     case'p':n=0;break;
     case'q':n=0;break;    
     case'r':n=0;break;
     case's':n=0;break;        
     case't':n=0;break;
     case'u':n=0;break;
     case'v':n=0;break;
     case'w':n=0;break;      
     case'x':n=0;break;
     case'y':n=0;break;   
     case'z':n=0;break; 
     case'_':n=0;break;
     default:n=1;break;
     }
     return(n); 
}
int main()
{
  int n;
  scanf("%d\n",&n);
  char s[1000][20];
  int i,j;
  for(i=0;i<n;i++)
  {
   scanf("%s\n",s[i]);
  }
  for(i=0;i<n;i++)
  {
   int x,y;
   y=0;
   x=strlen(s[i]);
   if(change(s[i][0])==1||(change(s[i][0])==0&&(s[i][0]=='0'||s[i][0]=='1'||s[i][0]=='2'||s[i][0]=='3'||s[i][0]=='4'||s[i][0]=='5'||s[i][0]=='6'||s[i][0]=='7'||s[i][0]=='8'||s[i][0]=='9')))
   {y=1;}
   else
   {
    for(j=1;j<x;j++)
    {
     if(change(s[i][j])==1)
     {y=1;break;}
    }
   }
   if(y==0)
   printf("yes\n");
   else if(y==1)
   printf("no\n");
  }
	return 0;
}
int main()
{
	int n,i,j,a=0,m;
	char s[20];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%s",s);
		m=strlen(s);
        a=0;
	for(j=0;j<m;j++)
	{
  		if((j==0)&&(s[0]>='0')&&(s[0]<='9')) {a=1;break;}
		if((s[j]=='_')||((s[j]<='z')&&(s[j]>='a'))||((s[j]<='Z')&&(s[j]>='A'))||((s[j]<='9')&&(s[j]>='0')))
		a=0;
	else {a=1;break;}
	}
	if(a==0)
		printf("yes\n");
	if(a==1) 
		printf("no\n");
    }
	return 0;
}
int main(){
	char s[21];
	int i,n,j;
	char jg[100];
	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)){
				continue;
			}else{
				break;
			}
		}
		jg[i]=s[j];
	}
	for(i=0;i<n;i++){
		if(jg[i]=='\0'){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
int main(){
  int n,i,a,b;
  scanf("%d",&n);
  char bsf[n][21];
  int l[21];
  for(i=0;i<n;i++){
      scanf("%s",&bsf[i]);
      l[i]=strlen(bsf[i]);
      a=0;
      if((bsf[i][a]>='a'&&bsf[i][a]<='z')||(bsf[i][a]>='A'&&bsf[i][a]<='Z')||(bsf[i][a]=='_')){
      b=1;
      for(a=1;a<l[i];a++){
          if((bsf[i][a]>='a'&&bsf[i][a]<='z')||(bsf[i][a]>='A'&&bsf[i][a]<='Z')||(bsf[i][a]=='_')||(bsf[i][a]>='0'&&bsf[i][a]<='9')){b++;}
      }
      if(b==l[i]){printf("yes\n");}
      else{printf("no\n");}
      }
      else{printf("no\n");}
  }
  return 0;
}
int main(int argc, char* argv[])
{
	int n,m=0;
	char a[39];
    int i,j,p;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		m=0;
		scanf("%s",a);
		for (j=0;a[j]!='\0';j++)
		{
			if(((a[j]>='0')&&(a[j]<='9')&&(j>0))||((a[j]>='A')&&(a[j]<='Z'))||((a[j]>='a')&&(a[j]<='z'))||(a[j]=='_'))
				m++;
		}
		p=strlen(a);
		if((m==p)&&((a[0]>='A'&&a[0]<='Z')||(a[0]>='a'&&a[0]<='z')||(a[0]=='_')))
			printf("yes\n");
		else 
			printf("no\n");			
	}
	return 0;
}
int main(){
	int i,j,len[22],n,ans;
	char zfc[100][22];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zfc[i]);						
	}
    for(i=0;i<n;i++){
		len[i]=strlen(zfc[i]);
		for(j=0;j<len[i];j++){
			ans=1;
			if(!((zfc[i][j]>='0' && zfc[i][j]<='9' && j>0)||
				(zfc[i][j]>='A' && zfc[i][j]<='Z')||
				(zfc[i][j]>='a' && zfc[i][j]<='z')||
				(zfc[i][j]=='_')))			
			{ans=0;
			break;}			
		}
		if(ans==1) printf("yes\n");
		else if(ans==0) printf("no\n");
	}   
	return 0;
}
int main()
{
int n,m,i,a;
scanf("%d",&n);
char s[300];
int len;
a=0;
for(i = 0; i < n; i++){
   scanf("%s", s);
   len = strlen(s);
     if((s[0]>=65&&s[0]<=90)||s[0]==95||(s[0]>=97&&s[0]<=122))
    {
          a=0;
      for(m=0;m<len;m++)
      {
          if((s[m]>=65&&s[m]<=90)||s[m]==95||(s[m]>=97&&s[m]<=122)||(s[m]>=48&&s[m]<=57))
         a=a;
          else a++;
       }
     }
      else a++;
   if(a==0)
   printf("yes\n");
   else printf("no\n");
}
return 0;
}
void main()
{
	int i,j,n,m,k;
	char c[100][1000];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
		scanf("%s",c[i]);
	for(i=1;i<=n;i++)
	{
		for(j=0;j<strlen(c[i]);j++)
			if(c[i][0]>='0'&&c[i][0]<='9')
            {
				printf("no\n");
				goto loop;
			}
			else if(c[i][j]=='_')
				continue;
			else if(c[i][j]>='A'&&c[i][j]<='Z')
				continue;
			else if(c[i][j]>='a'&&c[i][j]<='z')
				continue;
			else if(c[i][j]>='0'&&c[i][j]<='9')
				continue;
			else 
			{
				printf("no\n");
				goto loop;
			}
			printf("yes\n");
        loop:;
	}
}
int legal(char d[20]){
	int i;
	if(d[0]>='0'&&d[0]<='9')
		return 0;
	for(i=0;d[i];i++){
		if(!(d[i]==' '||d[i]>='A'&&d[i]<='Z'||d[i]>='a'&&d[i]<='z'||d[i]>='0'&&d[i]<='9'||d[i]=='_')){
			return  0;
		}
	}
	return 1;
}
	
int main()
{
	int i,t,n;
	char s[100][20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",s[i]);
	}
	for(i=0;i<n;i++){
		t=legal(s[i]);
	
		if(t==0)
			printf("no\n");
		else
			printf("yes\n");
	}
		return 0;	
}
int main()
{
	int n,i;
	int a,g;
	
	int j;
	scanf("%d",&n);
	
	for(i=0;i<n;i++)
	{
		a=0;
				 g=0;
		char s[21];
		scanf("%s",s);
			for(j=0;s[j]!='\0';j++)

			{
				 
				if(s[0]>=65&&s[0]<=90||s[0]>=97&&s[0]<=122||s[0]==95)
					a=a+1;
				    g++;
                    if(s[j]>=65&&s[j]<=90||s[j]>=97&&s[j]<=122||s[j]==95||s[j]>=48&&s[j]<=57)
					a=a+1;
				    g++;

			}
			if(a==g)
				printf("yes\n");
			else
				printf("no\n");
	}

                    
	return 0;
}
void main()
{
	int i,j,n,k;
	char a[21];

	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		k = 0;
		
		if((a[0]=='_')||((a[0]>='a')&&(a[0]<='z'))||((a[0]>='A')&&(a[0]<='Z')))
		{
			k++;
				for(j=1;j<strlen(a);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 == strlen(a))
					  printf("yes\n");
				  else
					  printf("no\n");
		}
		else
				printf("no\n");
	}
}
int main(){
	int n,k,i,j;
	scanf("%d",&n);
	char zfc[100][21];
	for(i=0;i<n;i++){
		scanf("%s",zfc[i]);
	}
	for(i=0;i<n;i++){
		
		k=strlen(zfc[i]);
		for(j=0;j<k;j++){
			if(zfc[i][0]>='0'&&zfc[i][0]<='9'){
				printf("no\n");
				break;
				
			
			}
			 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'){
				continue;

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

    for(c=0;c<n;c++){
		if(b[c]==1){
			printf("yes\n");
		}else{
	        printf("no\n");
		}
	}
	return 0;
}
int main(){
	char a[100][20];
	int n,i,test,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
         scanf("%s",a[i]);
	}
    for(i=0;i<n;i++)
	{
		for(j=0;a[i][j]!='\0';j++)
		{
			test=1;
			if(j==0)
			{
				if((a[i][j]>='A'&&a[i][j]<='Z')||a[i][j]=='_'||(a[i][j]>='a'&&a[i][j]<='z')) test=1;
				else {test=0;break;}
			}
			else if((a[i][j]>='A'&&a[i][j]<='Z')||a[i][j]=='_'||(a[i][j]>='0'&&a[i][j]<='9')||(a[i][j]>='a'&&a[i][j]<='z')) test=1;
			else {test=0;break;}
		}
		if(test==0) printf("no\n");
		else printf("yes\n");
    }
	return 0;
}
int main(){
	char a[20][21];
	int j,i,n,b,m;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",a[i]);
	}
	for(i=0;i<n;i++){
		m=0;
		for(j=0;a[i][j];j++){
	if(!((a[i][j]=='_')||(a[i][j] >= 'A' && a[i][j] <= 'Z')||(a[i][j] >= 'a' && a[i][j] <= 'z') ||(a[i][j] >= '0' && a[i][j] <= '9'&&j>0))){
					m=1;
				}
				}
			if(m==0){
				printf("yes\n");
			}else{
			printf("no\n");
				
			}
	}
	return 0;
}
int main()
{
	int n,i,j,y,b[500];
	scanf("%d",&n);	
	char a[20];
	for(i=0;i<n;i++)
	{
		scanf("%s",&a);
		if((a[0]>='a')&&(a[0]<='z')||(a[0]>='A')&&(a[0]<='Z')||(a[0]=='_'))
		{
			b[i]=1;
			for(j=1;j<(int)strlen(a);j++)
			{
				if((a[j]>='a')&&(a[j]<='z')||(a[j]>='A')&&(a[j]<='Z')||(a[j]=='_')
					||(a[j]>='0')&&(a[j]<='9'))
				{
					b[i]=1;
				}
				else
					b[i]=0;
				if(b[i]==0)
					break;
			}
		}
		else
			b[i]=0;
	}
	for(y=0;y<n;y++)
	{
		if(b[y]==0)
			printf("no\n");
		else
			printf("yes\n");
	}
	return 0;
}
int main()
{
     int i,n,j,a;
	 char s[1000][22];
	 scanf("%d",&n);
	 for(i=0;i<n;i++)
			 scanf("%s",s[i]);
	 for(i=0;i<n;i++){ 
		 a=1;
		 if(((s[i][0]>='a'&&s[i][0]<='z')||
				 (s[i][0]>='A'&&s[i][0]<='Z')||
				 (s[i][0]=='_'))){
			for(j=1;s[i][j]!='\0';j++){
			        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=0;
			}
		 }
         else
			 a=0;
		 if(a==1)
		 printf("yes\n");
	     if(a==0)
		 printf("no\n");	
	}
	 return 0;

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

	return 0;
}
int main(){
    char s[100][20];
    int i,j,n;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%s",s[i]);
        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))){
                break;
            }
        }
        if(s[i][j]=='\0'){
            printf("yes\n");
        }else{printf("no\n");}
    }
    return 0;
}
int main()
{
    int n=0,i=0,len=0;
    scanf("%d\n", &n);
    char str[100];
    while(i<n)
    {
        i++;
        fgets(str, 100, stdin);
        len = strlen(str) - 1;
        if(str[0]=='_'||isalpha(str[0]))
            for(int j=0;j<len;j++)
            {
                if(!(str[j]=='_'||isalpha(str[j])||isdigit(str[j])))
                {
                    cout<<"no"<< endl;
                    break;
                }
                else
                    if(j==len-1) cout<<"yes"<<endl;
            }
        else  cout<<"no"<<endl;
    }
    return 0;
}