semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(int argc, char* argv[])
{
	char p[100][20];
	int n,i,j;
         int k=1,c;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	
		scanf("%s",p[i]);
	
	for(i=0;i<n;i++)
	{
		{
			if((p[i][0]>='A'&&p[i][0]<='Z')||(p[i][0]>='a'&&p[i][0]<='z')||p[i][0]=='_')
		{
			for(j=1;p[i][j]!='\0';j++)
			{
			
				if((p[i][j]>='A'&&p[i][j]<='Z')||(p[i][j]>='a'&&p[i][j]<='z')||p[i][j]=='_'||(p[i][j]>='0'&&p[i][j]<='9'))
					k=k+1;
			}
		}
		}
		c=strlen(p[i]);
		if(k==c)
			printf("yes\n");
		else
		printf("no\n");
		k=1;

	}
	return 0;
}
int main()
{ 
  int n,i,j;
  char c[30];
  int sz[30]={0};

  scanf("%d\n",&n);

  for(i=0;i<n;i++)
  {
	  gets(c);

	  if((c[0]>='a' && c[0]<='z') || (c[0]>='A' && c[0]<='Z') || (c[0]=='_'))
	  {
		  for(j=1;c[j]!='\0';j++)
		  {
			  if(!((c[j]>='a' && c[j]<='z') || (c[j]>='A' && c[j]<='Z') || (c[j]=='_') || (c[j]>='0' && c[j]<='9')))
			  {
				 sz[i]=1;
				 break;
			  }
		  }
	  }
	  else
	  {
		  sz[i]=1;
	  }
  }

  for(i=0;i<n;i++)
  {
	  if(sz[i]==0)
	  {
		  printf("yes\n");
	  }
	  else
	  {
		  printf("no\n");
	  }
  }
  
 
 

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

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

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

l=strlen(a);
if ((a[0]<97||a[0]>122)&&(a[0]<65||a[0]>90)&&a[0]!=95) {
printf("no\n");
continue;
}
for (j=1;j<l;j++)
if((a[j]<97||a[j]>122)&&(a[j]<65||a[j]>90)&&(a[j]<48||a[j]>57)&&a[j]!=95)
{printf("no\n");
s=1;
break;}
if (s==0) printf("yes\n");
s=0;
}
return 0;
}
int main(){
	int i,j,h,n,p;char c;
	char a[100][100];
	scanf("%d",&n);
	for (i=1;i<=n;i++){
		scanf("%s",a[i]);
	}
	for (i=1;i<=n;i++){
		p=1; c=a[i][0];
		h=strlen(a[i]);
		if (c>='0'&&c<='9'){
			p=0; 
		}
		for (j=0;j<h;j++){
			c=a[i][j];
			if ((c>='0'&&c<='9')||(c>='A'&&c<='Z')||
				(c>='a'&&c<='z')||(c=='_')){
				continue;}
			else{ p=0; break;}
		}
		if (p==0){
			printf("no\n");}
		else{printf("yes\n");}
	}
	return 0;
}
int main(){
char sz[100][20];
    int n,len[20];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
      scanf("%s",sz[i]);
      len[i]=strlen(sz[i]);
    }
    for(int i=0;i<n;i++){
      if((sz[i][0]>='A'&&sz[i][0]<='Z')||(sz[i][0]>='a'&&sz[i][0]<='z')||(sz[i][0]=='_')){
        for(int j=1;j<=len[i];j++){
          if((sz[i][j]>='A'&&sz[i][j]<='Z')||(sz[i][j]>='a'&&sz[i][j]<='z')||(sz[i][j]=='_')||(sz[i][j]>='0'&&sz[i][j]<='9')){
            continue;
          }else if(sz[i][j]=='\0'){
            printf("yes\n");
            break;
          }else{
            printf("no\n");
            break;
          }
        }
      }else{
        printf("no\n");
      }
    }
return 0;
}
int biao(char a){
	if((a>='a'&&a<='z')||(a>='A'&&a<='Z')||(a>='0'&&a<='9')||a=='_'){
		return 1;
	}else{
		return 0;
	}
}
int main(){
	int n;
	char zfc[100][21];
	scanf("%d",&n);
	int i;
	for(i=0;i<n;i++){
		scanf("%s",zfc[i]);
	}
	int L;
	int k,l=0;
	for(i=0;i<n;i++){
		L=strlen(zfc[i]);
		for(k=0;k<L;k++){
			if(biao(zfc[i][k])){
				l++;
			}
		}
		if((zfc[i][0]<'0'||zfc[i][0]>'9')&&l==L){
			printf("yes\n");
		}else{
			printf("no\n");
		}
		l=0;
	}
	return 0;
}
void main() {
	char a[10000];
	int i,j,n,flag;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		gets(a);
		if((((a[0]>64)&&(a[0]<91))||((a[0]>96)&&(a[0]<123))||(a[0]==95))==0){
			printf("no\n");
		}else{
			flag=0;
			for(j=1;j<strlen(a);j++){
				if((((a[j]>47)&&(a[j]<58))||((a[j]>64)&&(a[j]<91))||((a[j]>96)&&(a[j]<123))||(a[j]==95))==0){
					printf("no\n");
					flag=1;
					break;
				}
			}
			if(flag==0){
				printf("yes\n");
			}
		}
	}
}
int main (){
    int n, x, i, b,j ;
    char a[21];
    
    scanf("%d", &n);
    
    for (i=0; i<n+1; i++){
        gets (a);
        x=0;
        if (a[0]==95||(a[0]>=65&&a[0]<=90)||(a[0]>=97&&a[0]<=122))
        {}
        else {x=1;}
        b=strlen(a);
        for (j=1; j<b; j++){
            if((a[j]>='0'&&a[j]<='9')||a[j]==95||(a[j]>=65&&a[j]<=90)||(a[j]>=97&&a[j]<=122)){}
            else
            {x=1;}
                                                                                                                                          
             }
        if (i>0){
        if(x==1){printf("no\n");}
        if(x==0){printf("yes\n");}
         }   
        }
    
    
    return 0;
    }
int main()
{
    int i, j, n;
    char s[32];
    
    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()
{
	int i,n;
	char sen[21];
	cin>>n;
	while(n--)
	{
		cin>>sen;
		if((sen[0]>='a'&&sen[0]<='z')
			||(sen[0]>='A'&&sen[0]<='Z')
			||sen[0]=='_')
		{
			for(i=1;i<strlen(sen);i++)
			{
				if((sen[i]>='a'&&sen[i]<='z')||(sen[i]>='A'&&sen[i]<='Z')||(sen[i]>='0'&&sen[i]<='9')||sen[i]=='_')
					continue;
				else 
				{
					cout<<"no"<<endl;
					goto lable;
				}
			}
			cout<<"yes"<<endl;
		}
		else 
			cout<<"no"<<endl;
lable:continue;
	}
	return 0;
}
int main() {
  int n;
  char buf[1024];
  char *tmp;
  int i;
  int ok;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%s", buf);
    ok = 1;
    tmp = buf;
    if (isdigit(*tmp)) {
      ok = 0;
    } else {
      while (*tmp != 0) {
        if (!isalnum(*tmp) && *tmp != '_') {
          ok = 0;
          break;
        }
        ++tmp;
      }
    }
    if (ok == 1)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}
int main(){
	char zxc[30];
	int n,i,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%s",zxc);
		for(k=0;zxc[k]!='\0';k++){
			if(zxc[0]-'0'<=9&&zxc[0]-'0'>=0){
				printf("no\n");
				break;
			}else if((zxc[k]-'A'<=25&&zxc[k]-'A'>=0)||(zxc[k]-'a'<=25&&zxc[k]-'a'>=0)||(zxc[k]-'0'<=9&&zxc[k]-'0'>=0)||(zxc[k]=='_')){
				
			
		
			}else{
				printf("no\n");
				break;
			
			}
			if(zxc[k+1]=='\0'){
			printf("yes\n");
			}
	}

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

			if((s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9')||s[j]=='_')
				w++;
		}
		if(s[0]>='0'&&s[0]<='9')
			continue;
		if(w==k)
			printf("yes\n");
		else
			printf("no\n");
	}
	
	return 0;
}
int main(){
	int n,j;
	scanf("%d",&n);
	struct SZ{
		char zfc[21];
	}sz[10000];
	int i;
	for(i=0;i<n;i++){
		scanf("%s",sz[i].zfc);
	}
	for(i=0;i<n;i++){
		for(j=0;sz[i].zfc[j];j++){
			if(!((sz[i].zfc[j]=='_')||(sz[i].zfc[j]>='A'&&sz[i].zfc[j]<='Z')||(sz[i].zfc[j]>='a'&&sz[i].zfc[j]<='z')||(sz[i].zfc[j]>='0'&&sz[i].zfc[j]<='9'&&j>0))){
				break;
			}

		}
		printf(sz[i].zfc[j]?"no\n":"yes\n");
	}
	return 0;
}
//?????
char main()
{
	int i,n,j,f[1000],l[1000];
	char a[20];
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		f[j]=1;
		scanf("%s",a);
		l[j]=strlen(a);
		if(a[0]<65 || (a[0]>90&&a[0]<95) || (a[0]>95&&a[0]<97) || a[0]>122)
		{
			f[j]=0;
		}
		else
		{
			for(i=1;i<l[j];i++)
			{
				if(a[i]=='_'||(a[i]>=48 && a[i]<=57)||(a[i]>=65 && a[i]<=90)||(a[i]>=97 && a[i]<=122))
				{
					f[j]=1;
					
				}
				else
				{
					f[j]=0;
					break;
				}
			}
		}
	}
	for(j=0;j<n;j++)
	{
		if(f[j]==1)
			printf("\nyes");
		else if(f[j]==0)
			printf("\nno");
	}
	return 0;
}
int main()
{
int n,i,j,c,m[100];
char zfc[21];
scanf("%d",&n);
for(i=0;i<n;i++)
{
	scanf("%s",zfc);
	 c=0;
	for(j=0;zfc[j]!='\0';j++)
	{
      
		if(j==0)
	   {
		   if((zfc[j]>='a'&&zfc[j]<='z')||(zfc[j]>='A'&&zfc[j]<='Z')||(zfc[j]=='_'))
		   c++;
		}
		else
		{
			if((zfc[j]>='a'&&zfc[j]<='z')||(zfc[j]>='A'&&zfc[j]<='Z')||(zfc[j]=='_')||(zfc[j]>='0'&&zfc[j]<='9'))
				c++;
		}
	}
if(c==j)
m[i]=1;
else
m[i]=0;
}
for(i=0;i<n;i++)
{
	if(m[i]==1)
	    printf("yes\n");
	else
		printf("no\n");
}
return 0;
}
void main()
{
	int n,len,temp,i,j;
	char a[25]={0};
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{   temp=1;
		scanf("%s",a);
		len=strlen(a);
	
		for(j=0;j<=len-1;j++)
		{
			if((a[0]<'a'||a[0]>'z')&&(a[0]<'A'||a[0]>'Z')&&(a[0]!='_'))
			{
			printf("no\n");
			temp=0;
			break;
			}
			if((a[j]<'a'||a[j]>'z')&&(a[j]<'A'||a[j]>'Z')&&(a[j]!='_')&&(a[j]<'0'||a[j]>'9'))
			{
			printf("no\n");
			temp=0;
			break;
			}
			
		}
		if(temp==1)
			printf("yes\n");
	}
}
int main()
{    
    char a[21];
    int i,j,n,k=0;
    int len;
    scanf("%d\n",&n);
    for(i=1;i<=n;i++)
    { 
     k=0;               
     gets(a);
     if (a=="\0") continue;
     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"); 
      else
       printf("no\n");
      }
     else
      { 
        printf("no\n");
        continue;
      }
     
     }
}
void main()
{
	int n, i, j, tmp, m[100];
	char a[21];
	scanf("%d", &n);
	for(i=0; i<n; i++)
	{
		tmp=0;
		scanf("%s", a);
		if(a[0]=='_'||(a[0]>=65&&a[0]<=90)||(a[0]>=97&&a[0]<=122))
		{
			tmp=0;
			for(j=1; j<strlen(a); j++)
			    if(!(a[j]=='_'||(a[j]>=65&&a[j]<=90)||(a[j]>=97&&a[j]<=122)||(a[j]>=48&&a[j]<=57)))
				{
				    m[i]=0;
					tmp=1;
					break;
				}
			if(tmp==0)
		        m[i]=1;
		}
		else
			m[i]=0;
	}
	for(i=0; i<n; i++)
	{
		if(m[i]==0)
			printf("no\n");
		else
			printf("yes\n");
	}
}
int f(char a[])
{
	int len,count=0;
	char *p;
	len=strlen(a);
	for(p=a;p<(a+len);p++)
	{
		if((*p>='A'&&*p<='Z')||(*p>='a'&&*p<='z')||(*p>='0'&&*p<='9')||(*p=='_'))
		{
			count++;
		}
	}
	
	
	    if((count==len)&&(((a[0]>='A'&&*p<='Z')||(a[0]>='a'&&*p<='z'))||a[0]=='_'))
		   return(1);
	    else
		   return(0);
	
}
void main()
{
	int n,i;
	char a[30];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		if(f(a)==1)
			printf("yes\n");
		else
			printf("no\n");
	}
}
int main()
{
    int i,n,j;
	char str[22];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>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'))
					break;
			}
			if(str[j]=='\0') cout<<"yes"<<endl;
			else cout<<"no"<<endl;
		}
		else cout<<"no"<<endl;
	}
	return 0;
}
int main()
{
	int n,i,j,k;
	char word[1000][1000]={'\0'};
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%s",word[i]);
		k=strlen(word[i]);
		if((word[i][0]>=65&&word[i][0]<=90)||(word[i][0]>=97&&word[i][0]<=122)||(word[i][0]=='_'))
		{
			j=1;
			while(j<=k-1)
			{
				if(word[i][j]=='_') j=j+1;
				else if((word[i][j]>=65)&&(word[i][j]<=90)) j=j+1;
				else if((word[i][j]>=97)&&(word[i][j]<=122)) j=j+1;
				else if((word[i][j]>=48)&&(word[i][j]<=57)) j=j+1;
				else break;
			}
			if(j==k) printf("yes\n");
			else printf("no\n");
		}
		else printf("no\n");
	}
	return 0;
}
int main()
{
	int n;
	cin>>n;
	cin.get();
	while(n--){
		char str[100];
		cin.getline(str,100);
		int k=strlen(str),flag=0;
		if(str[0]>='0'&&str[0]<='9')//??????????????
			cout <<"no"<<endl;
		else{
			for(int i=0;i<k;i++){
				if(str[i]>='a'&&str[i]<='z')
					flag++;
				else if(str[i]>='A'&&str[i]<='Z')
					flag++;
				else if(str[i]>='0'&&str[i]<='9')
					flag++;
				else if(str[i]=='_')
					flag++;
				else 
					break;
			}
			if (flag==k)
				cout<<"yes"<<endl;
			else
				cout << "no" <<endl;
		}
	}
	return 0;
}
int main()
{
	int n,i,j,temp[1000] = {0};
	char cr[21];
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%s",&cr);
		if((cr[0] >='a' &&cr[0]<='z') || (cr[0] >='A' &&cr[0]<='Z')|| cr[0] == '_')
		{
			for (j=1;j<20;j++)
			{
				if((cr[j] >= 'a' && cr[j] <= 'z') || (cr[j] >= 'A' && cr[j] <= 'Z') || (cr[j] >= '0' && cr[j] <= '9') || cr[j] == '_')
				{
					continue;
				}
				else if (cr[j] == '\0')
				{
					temp[i] = 1;
					break;
				}
				else
				{
					temp[i] = 0;
					break;
				}

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

return 0;
}
int main(){
	int n,i,l,j,c=0;
	char a[100],m;
	gets(&m);
	n=atoi(&m);
	//printf("%d ! ",n);
	for(i=1;i<=n;i++){
		c=0;
		gets(a);
		l=strlen(a);
		for(j=0;j<l;j++){
			if(a[0]>='0' && a[0]<='9'){
				c=1;
				break;
			}
		 	if(!((a[j]>='a' && a[j]<='z') ||(a[j]>='A' && a[j]<='Z') || (a[j]>='0' && a[j]<='9')) && a[j] != '_'){
			c=1;
			break;
			}
		//printf("%d * ",c);
		}
		if(c==0) printf("yes\n");
		else printf("no\n");
	
	}
	return 0;
}
int main()
{
    int i, j, n,a;                 /* ?????? */
    char s[MAX+1];               /* ?????? */
    scanf("%d", &n);             /* ???????????n */
    for (i = 0; i < n; i++) {    /* ??n? */
        scanf("%s", s);          /* ????????????? */
        for (j = 0;s[j]; j++) { /* ??????????? */
            a=strlen(s);
			if (!((s[j] == '_') ||     /* ???_ */
                  (s[j] >= 'A' && s[j] <= 'Z') ||   /* ???? */
                  (s[j] >= 'a' && s[j] <= 'z') ||   /* ???? */
                  (s[j] >= '0' && s[j] <= '9' && j > 0))){
                printf("no\n");                                /* ?????? */
                break; 
			}else if(j==0&&s[j]>='0'&&s[j]<='9'){
				printf("no\n");
			    break;
			}else if(j==a-1){
			    printf("yes\n");
			}
        } 
	}
    return 0;
}
int main()
{
	char sign[L+1];
	int n,len,i,j,t=1;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",sign);
		len=strlen(sign);
		if(sign[0]>='0'&&sign[0]<='9')
		{
			printf("no\n");
			t=0;
		}
		if(t==1)
		{
			for(j=0;j<len;j++)
			{
				if(!(sign[j]=='_'||sign[j]>='0'&&sign[j]<='9'||sign[j]>='a'&&sign[j]<='z'||sign[j]>='A'&&sign[j]<='Z'))
				{
					printf("no\n");
					break;
				}
			}
			if(j==len)
				printf("yes\n");
		}
		t=1;
	}
return 0;
}
int main()
{
	int i,n;
	scanf("%d",&n);
	char s[100][20];
	for(i=0;i<n;i++)
	{
		scanf("%s",s[i]);
	}
	for(i=0;i<n;i++)
	{
		if(s[i][0]=='_'||(s[i][0]>='a'&&s[i][0]<='z')||(s[i][0]>='A'&&s[i][0]<='Z'))
		{
			int j=1;
			for(;;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'));
				else if(s[i][j]=='\0')
				{
					printf("yes\n");
					break;
				}
				else
				{
					printf("no\n");
					break;
				}
				
			}
		}
		else printf("no\n");
	}
}
main()
{
	int n,i,len,j,t;
	char a[30];
	scanf("%d",&n);
	for(i=0;i<n;++i)
	{
		t=1;
		scanf("%s",a);
		len=strlen(a);
		if(a[0]>='0'&&a[0]<='9')
			printf("no\n");
		else
		{
			for(j=0;j<len;++j)
				if(!(a[j]>='0'&&a[j]<='9'||a[j]>='a'&&a[j]<='z'||a[j]>='A'&&a[j]<='Z'||a[j]=='_'))
					t=0;
			if(t)
				printf("yes\n");
			else
				printf("no\n");
		}

			
	}


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

  }

}
m:if(flag==0){
 printf("no\n");
}else{
 printf("yes\n");
}
 }
return 0;
}
int main(){
    char s[21];
    int n,i,j,p[100];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%s",s);
        p[i]=1;
        for(j=1;j<strlen(s);j++){
            if(s[0]=='_'||s[0]>='a'&&s[0]<='z'||s[0]>='A'&&s[0]<='Z'){
                if(s[j]=='_'||s[j]>='a'&&s[j]<='z'||s[j]>='A'&&s[j]<='Z'||s[j]>='0'&&s[j]<='9'){
                    p[i]=1;
                }else{
                    p[i]=0;
                    break;
                }
            }else{  p[i]=0;
                    break;
            }
        }
    } 
       for(i=0;i<n;i++){
           if(p[i]){
               printf("yes\n");
           }else{
               printf("no\n");
           }
       }
       return 0;
}
int main(){
	int n,i,j;
	char a[21];
	scanf("%d",&n);
	for(j=0;j<n;j++){
		scanf("%s",a);
		for(i=0;a[i];i++){
		if(a[i]=='_'||(a[i]>='0'&&a[i]<='9')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')){
			if(i==0&&(a[i]>='0'&&a[i]<='9')){
				printf("no\n");
				break;
			}
		}
		if(!(a[i]=='_'||(a[i]>='0'&&a[i]<='9')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z'))){
			printf("no\n");
			break;
		}
		}
		if(a[i]=='\0'){
			printf("yes\n");
		}
	}
	return 0;
}
int main() {
    int n, i, j;
    char data[100][21];
    int num[100]={0};
    scanf("%d" ,&n);
    for(i=0;i<n;i++) {
        scanf("%s", data[i]);
    }
    for(i=0;i<n;i++) {
        if(data[i][0]<='9'&&data[i][0]>='0') {
                num[i]++;
            continue;
            }
        for(j=0;data[i][j]!='\0';j++) {
            if((data[i][j]<='Z'&&data[i][j]>='A')||(data[i][j]>='a'&&data[i][j]<='z')||(data[i][j]>='0'&&data[i][j]<='9')||data[i][j]=='_') {}
            else {
                num[i]++;
            }
        }
    }
    for(i=0;i<n;i++) {
        if(num[i]!=0) {
            printf("no\n");
        } else {
            printf("yes\n");
        }
    }
    return 0 ;
}
int main(){
	int n,i,c,j;
    char a[21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",a);
		c=0;
		for(j=0;j<strlen(a);j++){
			if(j==0){
				if((a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')||(a[0]=='_')&&(a[0]<'0'||a[0]>'9')){
					c++;}
			}
			else{
				if((a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z')||(a[j]=='_')||(a[j]>='0'&&a[j]<='9')){
						 c++;}
			}
		}
		if(c==strlen (a)){
			printf("yes\n");
		}
		else{
			printf("no\n");}
	}
	return 0;
}
void main()
{
	int n,i,j;
	char word[100][30];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",word[i]);
	}
	for(i=0;i<n;i++)
	{
		int flag=1;
		for(j=0;j<strlen(word[i]);j++)
		{
			if(((word[i][0]<='Z'&&word[i][0]>='A')||(word[i][0]<='z'&&word[i][0]>='a')||word[i][0]=='_')!=1)
			{
				flag=0;
			break;
			}
			else if(((word[i][j]<='Z'&&word[i][j]>='A')||(word[i][j]<='z'&&word[i][j]>='a')||word[i][j]=='_'||(word[i][j]>='0'&&word[i][j]<='9'))!=1&&word[i][j]!='\0')
			{
				flag=0;
			break;
			}			
		}
		if(flag==1)
			printf("yes\n");
		else
		printf("no\n");
	}
}
int main(){
	int i,j,n;
	char l[max+1];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",l);
		for(j=0;j<l[j];j++){
			if(!((l[j]=='_')||
			(l[j]>='A'&&l[j]<='Z')||
			(l[j]>='a'&&l[j]<='z')||
			(l[j]>='0'&&l[j]<='9'&&j>0)))
			break;
		}
		if(l[j]){
			printf("no\n");
		}
		else{
			printf("yes\n");
		}
	}
	return 0;
}