semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n = 0, b = 0, j = 0, flag = 0;
	cin >> n;
	cin.get();
	char a[50];
	while(n > 0)
	{
		flag = 1;
		b = 0;
		memset(a,0,sizeof(a));
		cin.getline(a,50);
		b = strlen(a);
		if(a[0] >= '0' && a[0] <= '9')
		{
			flag = 0;
		}
		else
		{
			for(j = 0; j <= b - 1; j++)
			{
				if((a[j] < '0' || (a[j] > '9' && a[j] < 'A') || (a[j] > 'Z' && a[j] < 'a') || (a[j] > 'z')) && a[j] != '_')
				{
					flag = 0;
					break;
				}
			}
		}
		if(flag == 0)
		{
			cout << "no" <<endl;
		}
		if(flag == 1)
		{
			cout << "yes" <<endl;
		}
		n--;
	}
	return 0;
}
int main(int argc, char* argv[])
{
	int n;
	int i,j,k;
	char s[1000];
	scanf ("%d",&n);
	for (i=2;i<=n+1;i++)
	{
		k=1;
		scanf ("%s",s);
		if(isalpha(s[0])||s[0]=='_')
		{
			for (j=1;s[j]!='\0';j++)
			{
				if (isalnum (s[j])||s[j]=='_')
				{
					k++;
				}
				
			}	
			if (k==j)
			{
				printf ("yes\n");
			}
			else 
			{
				printf("no\n");
			}
		}
		else
		{
			printf("no\n");
		}	
	}
	return 0;
}
int main(){
	char str[MAX+1];
	int n,i,j,len;
gets(str);
n=atoi(str);
  for(i=0;i<n;i++){
	  gets(str);
 len=strlen(str);
	  if((str[0]<='z'&&str[0]>='a')||(str[0]<='Z'&&str[0]>='A')||str[0]=='_'){
	   for(j=1;j<len;j++){
		   if((str[j]<='z'&&str[j]>='a')||(str[j]<='Z'&&str[j]>='A')||(str[j]=='_')||(str[j]<='9'&&str[j]>='0'))
			   continue;
		   else
			   break;
	   }
	   if(j==len)
		   printf("yes\n");
		else
printf("no\n");
	  }
	  else
printf("no\n");
  }

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

	int i,n,j,c,a;
	scanf("%d",&n);		
	
	for(j=0;j<n;j++)
		{	c=0;
		a=0;
		char s[21];
	      scanf("%s",s);
	for(i=0;s[i]!='\0';i++)
		{		
		if(s[0]==95||(s[0]<=122&&s[0]>=97)||(s[0]<=90&&s[0]>=65))
				c++;
		       a++;
		 if(s[i]==95||(s[i]<=122&&s[i]>=97)||(s[i]<=90&&s[i]>=65)||(s[i]<=57&&s[i]>=48))
		 	c++;
		     a++;
		 
	}
		
	if(c==a)
	{printf("yes\n");}
    else
	{printf("no\n");}	
	}


	return 0;
}
void main()
{
    int n,i,k,j,flag;
    char key[37][20]={"int","char","float","double","short","long","unsigned","struct","union","enum","auto","extern","register","static","typedef","goto","return","sizeof","break","continue","if","else","do","while","for","switch","case","default","void","entry","include","define","undef","ifdef","ifndef","endif","line"};
    char a[100];
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
    	flag=0;
    	scanf("%s",a);
    	k=strlen(a);
    	
    	if (a[0]>122||(a[0]>90&&a[0]<97&&a[0]!=95)||a[0]<65) flag=1;
    	
    	
    	for (j=1;j<k;j++)
    	{
    		if (a[j]<48||a[j]>122||(a[j]>57&&a[j]<65)||(a[j]>90&&a[j]<97&&a[j]!=95)) flag=1;
    	}
    	
    	for (j=0;j<37;j++) 
    	{
    		if (!strcmp(key[j],a))  flag=1;
    	}
    	
    	if (flag==1)
    	{
    		printf("no\n");
    	} 
    	else printf("yes\n");
    }
}
int check(char a[])
{
	int i,n;
	n=strlen(a);
	if(!(a[0]=='_'||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')))
		return 0;
	else
	{
		for(i=1;i<n;i++)
		{
			if(!((a[i]>='0'&&a[i]<='9')||a[i]=='_'||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')))
				return 0;
		}
	}
	return 1;
}
void main()
{
	char a[21];
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		if(check(a))
			printf("yes\n");
    	else
	    	printf("no\n");
	}
}
int main(){
	int n,i,j;
	char str[100][21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",str[i]);
	for(i=0;i<n;i++)
		if(str[i][0]<'A'
			||(str[i][0]>'Z'&&str[i][0]<'a'&&str[i][0]!='_')
			||str[i][0]>'z')
				printf("no\n");
		else
			for(j=0;j<strlen(str[i]);j++)
				if(str[i][j]<'0'
					||(str[i][j]>'9'&&str[i][j]<'A')
					||(str[i][j]>'Z'&&str[i][j]<'a'&&str[i][j]!='_')
					||str[i][j]>'z'
					){
						printf("no\n");
						break;
				}
				else if(j==strlen(str[i])-1)
					printf("yes\n");
	return 0;
}
int main(int argc, char* argv[])
{
    char s[20];
	int n,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++){
    scanf("%s",s);
	for(j=0;s[j]!='\0';j++){
		if(j==0){
    if((s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||s[j]=='_')
	{
		if(s[j+1]=='\0')
		    	printf("yes\n");
		continue;
	}
    else{
			printf("no\n");
		break;
	}
		}
        else
		{
    if((s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9')||(s[j]>='a'&&s[j]<='z')||s[j]=='_')
	{
		if(s[j+1]=='\0')
		    	printf("yes\n");
		continue;
	}
    else{
			printf("no\n");
		break;
	}
		}
	}
	}

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

			}
		}
		else {
			b[i]=1;	
		}
	}
		for(i=0;i<n;i++)
		{
			if(b[i]==1) 	printf("no\n");
		    else printf("yes\n");
		}
	return 0;
}
int main()
{
    int c;
    int j;
    int i;
    int n;

    int t[100][20];
    char s[100][20];
    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]!='\0';j++){
            t[i][j]=s[i][j];
        }
    }
    for (i=0;i<n;i++){
        if (t[i][0]>=48&&t[i][0]<=57){
            printf ("no\n");
            
        }else {
            for (j=0;s[i][j]!=0;j++){
                if (t[i][j]>=32&&t[i][j]<=47){
                    c=1;
                    break;
               } else if (t[i][j]>=58&&t[i][j]<=64){
                    c=1;
                    break;
                }else if (t[i][j]>=91&&t[i][j]<=94){
                    c=1;
                    break;
                }else if (t[i][j]>=123&&t[i][j]<=126){
                    c=1;
                    break;
                }else if (t[i][j]==96){
                    c=1;
                    break;
                    
               }else {
                    c=0;
               }
            
            }
            if (c==1){
                printf ("no\n");
            }else {
                printf ("yes\n");
            }
        }
    }
	

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


return 0;
}
int judge(char *zfc)
{
	char *p;
	p=zfc;
	for(;*p!='\0';p++){
		if(*p=='_'||('A'<=*p&&*p<='Z')||('a'<=*p&&*p<='z')||('0'<=*p&&*p<='9'&&p!=zfc)){
			continue;
		}else{
			return 0;
		}
	}
	return 1;
}
int main()
{
	int i;
	char z[3];
	gets(z);
	int n=atoi(z);
	for(i=0;i<n;i++){
		char zfc[81];
		gets(zfc);
		if(judge(zfc)){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
int main ()
{int n,m,z,i,j;
char a[21];
scanf ("%d",&n);
for (i=0;i<n;i++)
{m=1;
scanf ("%s",a);
z=strlen(a);
if (a[0]<65 || (a[0]>90 && a[0]<97) || a[0]>122) m=0;
if (a[0]==95) m=1;
if (m==1)
for (j=1;j<z;j++)
{if (a[j]<48) m=0;
if (a[j]>57 && a[j]<65) m=0;
if (a[j]>90 && a[j]<95) m=0;
if (a[j]>95 && a[j]<97) m=0;
if (a[j]>122) m=0;
if (m==0) break;
}
if (m==0) printf ("no\n");
else
printf ("yes\n");
}
return 0;}
void main()
{
	char str[1000];
	int n,i,a,b,c,d,e,l,j;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		e=0;
		gets(str);
		l=strlen(str);
		for(j=0;j<l;j++)
		{
		a=0;
		b=0;
		c=0;
		d=0;
			if(str[j]>64 && str[j]<91 ) a=1;
			if(str[j]>96 && str[j]<123) b=1;
			if(str[j]>47 && str[j]<58 ) c=1;
			if(str[j]==95) d=1;
			if(a==0 && b==0 && c==0 && d==0){e=1; break;}
		}
		if(e==1) {printf("no\n");}
		if(e==0)
		{
			if(str[0]>47 && str[0]<58)
				printf("no\n");
			else 
				printf("yes\n");
		}


	}



}
int main(int argc, char *argv[])
{
  int n,i;
  scanf("%d",&n);
  while(n--)
  {
  char a[25];
  scanf("%s",a);
  int len=strlen(a);
  int t=1;
  if(!(a[0]>='A'&&a[0]<='Z'||a[0]>='a'&&a[0]<='z'||a[0]=='_'))
  {
    printf("no\n");
    continue;
  }
  for(i=0;i<len;i++)
  {
    if(!(a[i]>='A'&&a[i]<='Z'||a[i]>='a'&&a[i]<='z'||a[i]=='_'||a[i]>='0'&&a[i]<='9'))
    {
      t=0;
      break;
    }
      
  }
  if(t)
  printf("yes\n");
  else
  printf("no\n");
  }
  return 0;
}
int main(){
	char zfc[100][21];
	int n,i,k,jieguo[100]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("\n%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(k=0;zfc[i][k]!='\0';k++){
				if((zfc[i][k]>='a'&&zfc[i][k]<='z')||(zfc[i][k]>='A'&&zfc[i][k]<='Z')||(zfc[i][k]>='0'&&zfc[i][k]<='9')||zfc[i][k]=='_'){
					continue;
				}else{
					jieguo[i]=99;
				}
			}
		}else{
			jieguo[i]=99;
		}
	}
	for(i=0;i<n;i++){
		if(jieguo[i]==99){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
	char zfc[22];
	int n,a[100]={0};
	scanf("%d",&n);
	for(int j=0;j<n;j++){
		scanf("%s",zfc);
		int len=strlen(zfc);
	for(int i=0;i<len;i++){
		if(i==0&&(zfc[i]>='0'&&zfc[i]<='9')){
			a[j]=0;
			break;
		}
		if(zfc[i]>='A'&&zfc[i]<='Z'||zfc[i]>='a'&&zfc[i]<='z'||zfc[i]=='_'||zfc[i]>='0'&&zfc[i]<='9'){
		}else{
			a[j]=0;
			break;
		}
		if(i==len-1){
			a[j]=1;
		}
	}
	}
	for(int i=0;i<n;i++){
		if(a[i]==0) printf("no\n");
		else printf("yes\n");
	}	
	return 0;
}
int main()
{
	int n;
	char s[50];
	int i,j;
	int mark;
	int len;
	scanf("%d",&n);
	gets(s);
	for(i=0;i<n;i++)
	{
		mark=0;
		gets(s);
		len=strlen(s);
		if((s[0]==95)||(s[0]>=65&&s[0]<=90)||(s[0]>=97&&s[0]<=122))
			mark=mark;
		else
			{
			  printf("no\n");
		      continue;
			}
		for(j=1;j<len;j++)
		{
			if((s[j]==95)||(s[j]>=65&&s[j]<=90)||(s[j]>=97&&s[j]<=122)||(s[j]>=48&&s[j]<=57))
				mark=mark;
			else mark=mark+1;
		}
		if(mark==0)
			printf("yes\n");
		else
			printf("no\n");

	}
	return 0;

}
void main()
{
	int i,j,n,l;
	char a[21];
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		scanf("%s",a);
		l=strlen(a);
		for(i=0;i<l;i++)
		{
			if(i==0)
			{
				if(a[i]>=65&&a[i]<=90||a[i]>=97&&a[i]<=122||a[i]=='_')
				{
					continue;
				}
				else
				{
					break;
				}
			}
			if(i!=0)
			{
				if(a[i]>=65&&a[i]<=90||a[i]>=97&&a[i]<=122||a[i]=='_'||a[i]>=48&&a[i]<=57)
				{
					continue;
				}
				else
				{
					break;
				}
			}
		}
	    if(i==l)
		{
		    printf("yes\n");
		}
	    else
		{
		    printf("no\n");
		}
	}
}
int main()
{
	int n,i,j,length,flag;
	char str[21];
	cin>>n;
	cin.get();
	for(j=0;j<n;j++)
	{
		cin.getline(str,21);
		length=strlen(str);
	    flag=0;
		if((str[0]>='A'&&str[0]<='Z')||(str[0]>='a'&&str[0]<='z')||(str[0]=='_'))
		{
			flag=1;
			for(i=1;i<length;i++)
			{
				if((str[i]>='A'&&str[i]<='Z')||(str[i]>='a'&&str[i]<='z')||(str[i]=='_')||(str[i]>='0'&&str[i]<='9')) flag++;
				else 
				{
					cout<<"no"<<endl;
					break;
				}
			}
			if(flag==length) cout<<"yes"<<endl;
		}
		else cout<<"no"<<endl;
	}
	return 0;
}
int main()
{
	int n,i,j,len,k;
	char str[21];
	scanf("%d",&n);
	for(i=1; i<=n;i++)
	{
        k=0;
		scanf("%s",str);
		len=strlen(str);
		if(((str[0]>64)&&(str[0]<91))||((str[0]>96)&&(str[0]<123))||(str[0]=='_'))
		{
			for(j=1;j<len;j++)
			{
				if(!(((str[j]>47)&&(str[j]<58))||((str[j]>64)&&(str[j]<91))||((str[j]>96)&&(str[j]<123))||(str[j]=='_')))
				{
					k++;
				}
			}
			if(k==0)
			{
				printf("yes\n");
			}
			else
			{
				printf("no\n");
			}
		}
		else
		{
			printf("no\n");
		}
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	char sz[100];
	int jg[100];
	int i,j,len,e;
	for(j=0;j<n;j++)
	{
		e=0;
		scanf("%s",sz);
		len=strlen(sz);
		if(sz[0]>='a'&&sz[0]<='z')
		{
			e++;
		}
		if(sz[0]>='A'&&sz[0]<='Z')
		{
			e++;
		}
		if(sz[0]=='_')
		{
			e++;
		}
		for(i=1;i<len;i++)
		{
			if(sz[i]>='a'&&sz[i]<='z')
			{
			   e++;
			}
		    if(sz[i]>='A'&&sz[i]<='Z')
			{
			   e++;
			}
		    if(sz[i]=='_')
			{
			   e++;
			}
		    if(sz[i]>='0'&&sz[i]<='9')
			{
			   e++;
			}
		}
		if(e==len)
		{
			jg[j]=1;
		}
		else
		{
			jg[j]=0;
		}
		
	}

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

return 0;
}
int j=0;
void shuchu(int k)
{
  if(k!=0)
  printf("yes\n");
 else
  printf("no\n");
}
void decide(char t[])
{
int de=0,j=0;
 if(t[0]<='9'&&t[0]>='0')
  {
    de=0;
    
   }
else
{
 while(t[j]!='\0')
 {
   if((t[j]<='9'&&t[j]>='0')||(t[j]<='z'&&t[j]>='a')||(t[j]<='Z'&&t[j]>='A')||(t[j]=='_'))
    {
      de=1;
  j++;
     }
else
 {de=0;
  break;}
  }
}
  shuchu(de);
 
} 
    
  
int main()
{
  int n;
scanf("%d",&n);
int i;
char u[100][100];
for(i=0;i<n;i++)
{
  scanf("%s",u[i]);
}
for(i=0;i<n;i++)
{
    decide(u[i]);
}
return 0;
}
int main(){
    #define NUM 100
    char z[20][NUM];
    int n,i=0,j=0,len,k;
    scanf("%d",&n);
    
    for(i=0;i<n;i++){
        scanf("%s",z[i]);
        
    }
        
    for(i=0;i<n-1;i++){
        
        len= strlen(z[i]);
        
        for( j=0;j<len;j++){
            
           if(j==0){
            if(z[i][j]=='_'||(z[i][j]>='a' && z[i][j]<='z')||(z[i][j]>='A' && z[i][j]<='Z')){
                continue;
            }else{
            printf("no\n");
            break;}
            
           }else{
            if((z[i][j]=='_')||(z[i][j]>='a' && z[i][j]<='z')||(z[i][j]>='A' && z[i][j]<='Z')||(z[i][j]>='0' && z[i][j]<='9')){
                continue; 
             }else{
                 printf("no\n");
                 break;}       
            }
             
        }
        if(j==len){printf("yes\n");}
       
    }
    if(i==n-1){
     k = strlen(z[n-1]); 
     for( j=0;j<k;j++){
            if(j==0){
                
            if((z[n-1][j]=='_')||(z[n-1][j]>='a' && z[n-1][j]<='z')||(z[n-1][j]>='A' && z[n-1][j]<='Z')){
                continue;
            }else{printf("no");break;}
            
            }else{
            
            if((z[n-1][j]=='_')||(z[n-1][j]>='a' && z[n-1][j]<='z')||(z[n-1][j]>='A' && z[n-1][j]<='Z')||(z[n-1][j]>='0' && z[n-1][j]<='9')){
                continue; 
             }else{printf("no");break;}
             
            }
             
           }
           if(j==k){printf("yes");}}

 


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

				k++;
		   
	    
	
		}	
		if(k>0)
			printf("no\n");
		else
		    printf("yes\n");
	}   
			
	return 0;
}
void main()
{
	int n,first=1,no=0;
	char c;
	scanf("%d",&n);
	getchar();
	for(;n>0;n--){
		c=getchar();
		while(c!='\n'){
			if(first){
				if(!(isalpha(c)||c=='_')){
					no=1;
					break;
				}
				else first=0;
			}
			else{
				if(!(isalnum(c)||c=='_')){
					no=1;
					break;
				}
			}
			c=getchar();
		}
		if(no){
			printf("no\n");
			while(c!='\n') c=getchar();
		}
		else printf("yes\n");
		first=1;
		no=0;
	}
	
}
int main(){
int i,k,n,q,w;
char a[100][21];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",a[i]);}
for(i=0;i<n;i++){
q=strlen(a[i]);
w=0;
for(k=0;k<q;k++){
if(k==0&&(a[i][k]==95||(a[i][k]>=97&&a[i][k]<=122)||(a[i][k]>=65&&a[i][k]<=90))){w++;}
if(k!=0&&(a[i][k]==95||(a[i][k]>=97&&a[i][k]<=122)||(a[i][k]>=48&&a[i][k]<=57)||(a[i][k]>=65&&a[i][k]<=90))){w++;}
}
if(w==q){printf("yes\n");}
else{printf("no\n");}
}
return 0;
}
int main()
{
    int i, j, n,k=0;                 
    char s[MAX+1];              
    scanf("%d", &n);             
    for (i = 0; i < n; i++) {    
        scanf("%s", s); 
		k=0;
        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; 
			k++;

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

	for(i=0;i<n;i++)
	scanf("%s",m[i]);

	for(i=0;i<n;i++)
	{for(j=0;j<strlen(m[i]);j++)
	{if(m[i][j]>'z'||m[i][j]<48) 
	{b++;
	break;}
	else if(m[i][j]>57&&m[i][j]<'A')
	{b++;
	break;}
	else if(m[i][j]>'Z'&&m[i][j]<'a'&&m[i][j]!='_')
	{b++;
	break;}
	else if(m[i][0]>=48&&m[i][0]<=57)
	{b++;
	break;}
	}
	if(b==0)
	{printf("yes\n");
	continue;}
	else
	{printf("no\n");
	b=0;
     continue;
	}
	}
return 0;
}
char str[21];
int main()
{
    int n,m;
    int l1,l2;

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

    return 0;
}
int main()
{
	int n,i,j,t=0,b;
	char s[10000];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		b = 0;
		scanf("%s",s);
		if(isalpha(s[0])==0&&s[0]!='_')
			b=1;
		else
		{
			for(j=0;j<strlen(s);j++)
			{
				if (isalnum(s[j])==0&&s[j]!='_')
			//	if(ispunct(s[j])!=0||s[j]!='_')
				{
					b = 1;
					break;
				}
			}
		}
		if(b==0)
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	char **a;
	a=(char **)malloc(sizeof(char *)*n);
	int i,j;
	for(i=0;i<n;i++)
	{
		a[i]=(char *)malloc(sizeof(char)*100);
		scanf("%s",a[i]);
		//gets(a[i]);
	}
	//for(i=0;i<n;i++)
		//puts(a[i]);
	int flag=1;
	for(i=0;i<n;i++)
	{
		if((a[i][0]==95)||(a[i][0]>=65&&a[i][0]<=90)||(a[i][0]>=97&&a[i][0]<=122))
		{
			for(j=1;j<(int)strlen(a[i]);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]==95)
					continue;
				else
				{
					printf("no\n");
					break;
				}
			}
			if(j==(int)strlen(a[i]))
			   printf("yes\n");
		}

		else
			printf("no\n");
	}
	return 0;
}