semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main() {
    int n;
    char str[1024];
    scanf("%d", &n);
    int flag;
    while (n--) {
        flag = 1;
        scanf("%s", str);
        int len = strlen(str);
        for (int i = 0; i < len; ++i) {
            if (isalpha(str[i]) || str[i] == '_')
                continue;
            else if (i != 0 && isdigit(str[i]))
                continue;
            else {
                flag = 0;
                break;
            }
        }
        if (flag)
            printf("yes\n");
        else
            printf("no\n");
    }
}
void main()
{
	int n,i,j;
	int len,flag;
	char zfc[X];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",zfc);
		len=strlen(zfc);
		flag=1;
		for(j=1;j<len;j++)
		{	
			if(zfc[0]>='a' && zfc[0]<='z' || zfc[0]>='A' && zfc[0]<='Z' || zfc[0]=='_');
			else
			{
				printf("no\n");
				flag=0;
				break;
			}
			if(zfc[j]>='0' && zfc[j]<='9' || zfc[j]>='a' && zfc[j]<='z' || zfc[j]>='A' && zfc[j]<='Z'|| zfc[j]=='_');
			else
				{
					printf("no\n");
					flag=0;
					break;
				}
		}
		if(flag==1)
			printf("yes\n");

	}
}
void main()
{
char a[200];
	int n,i,j,m,k,flag;
	scanf("%d",&n);gets(a);
	for(i=0;i<n;i++)
	{
		 gets(a);

                  m=strlen(a);
		flag=1;
                  k=0;
		for(j=0;j<m;j++)
		{
			if(a[j]>='a'&&a[j]<='z')
				k++;
			if(a[j]>='A'&&a[j]<='Z')
				k++;
			if(a[j]=='_')
				k++;
			if(a[j]>='0'&&a[j]<='9')
				k++;
                        else k=k;
		}
		if(k!=m)
			flag=0;
        if(a[0]>='0'&&a[0]<='9')
			flag=0;
		if(flag==0)
			printf("no\n");
		else if(flag==1)
			printf("yes\n");
	}
}
int main()
{
    int i=0,j,n,p,a,b,m;
    char A[30],M[5];
    gets(M);
    n=atoi(M);
    while(i<n)
    {
        for(p=0;p<30;p++)
        {
            A[p]=0;
        }
        gets(A);
        m=strlen(A);
        b=A[0];
        if(b<65||(90<b&&b<95)||b==96||(b>122))
        {
            printf("no\n");
            goto k;
        }else{
        for(j=1;j<m;j++)
        {
           a=A[j];
           if((a<48)||(a>57&&a<65)||(90<a&&a<95)||a==96||(a>122))
           {
               printf("no\n");
               goto k;
           }
        }
        printf("yes\n");
    }
 k:   i++;
    }
    return 0;
}
int main(int argc, char* argv[])
{
	int i, j, n, t, flag;
	char syx[21];
	scanf("%d", &n);
	for (i=0; i<n; i++)
	{
		flag = 1;
		scanf("%s", syx);
		t = strlen(syx);
		for (j=0; j<t; j++)
		{
			if(syx[j]==95)
				continue;
			else if(j==0 && syx[j] < 65 || syx[j] > 90 && syx[j] < 94 || syx[j]>122)
			{
				flag = 0;
				break;
			}
			else if(syx[j] < 48 || syx[j]>57 && syx[j] < 65 || syx[j] > 90 && syx[j] <97 || syx[j] > 122)
			{
				flag = 0;
				break;
			}
		}
		if (flag == 0)
			printf("no\n");
		else
			printf("yes\n");
	}

	return 0;
}
int main()
{
	char a[30];
	int n,i,j,k;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		gets(a);
		j=0;k=0;
		while(a[j]!=0)
		{
			if(j==0&&(a[j]!='_')&&(a[j]<'A'||a[j]>'Z')&&(a[j]<'a'||a[j]>'z'))
			{
				k=1;
				break;
			}
			if(j!=0&&(a[j]!='_')&&(a[j]<'A'||a[j]>'Z')&&(a[j]<'a'||a[j]>'z')&&(a[j]<'0'||a[j]>'9'))
			{
				k=1;
				break;
			}
			j++;
		}
		if(k)
			printf("no\n");
		else
			printf("yes\n");
	}
	return 0;
}
main()
{
	int m,n,i,j,k,l;
	char a[100][200];
	scanf("%d\n",&n);
	for (i=0;i<n;i++) gets(a[i]);
	for (i=0;i<n;i++)
	{
		if (a[i][0]<58&&a[i][0]>47) 
		{
			printf("no\n");
		}
		else 
		{for (j=0;a[i][j]!='\0';j++)
		{
			if (a[i][j]!='_')
			{
				if (a[i][j]<48||a[i][j]>122)
				{
					printf("no\n");
					break;
				}
				if (a[i][j]<65&&a[i][j]>57)
				{
					printf("no\n");
					break;
				}
				if (a[i][j]<97&&a[i][j]>90)
				{
					printf("no\n");
					break;
				}
			}
		}
		if (a[i][j]=='\0') printf("yes\n");
		}
	}
}
int main(){
    int n=0,i=0,j=0,LEN=0,k=0;
    scanf("%d",&n);
    char zf[21];
    for(i=0;i<n;i++){
        j=0;
        scanf("%s",zf);
        LEN=strlen(zf);
        while(j<LEN){
            if((zf[j]>='a'&&zf[j]<='z')||(zf[j]>='A'&&zf[j]<='Z')||zf[j]=='_'||(j!=0&&zf[j]>='0'&&zf[j]<='9')){
                k=0;
                j++;
            }else{
                k=1;
                break;
            }
        }
        if(k==0){
            printf("yes\n");
        }else{
            printf("no\n");
        }
    }
    return 0;
}
int main(){
	int n,i,k,c;
	char x[10],zfc[20];
	gets(x);
	n=atoi(x);
	for(i=0;i<n;i++){
		gets(zfc);
		c=0;
		for(k=0;zfc[k]!='\0';k++){
			if(k==0){
				if((zfc[k]>='0')&&(zfc[k]<='9')){
					c++;
				}else if((zfc[k]>='\0'&&zfc[k]<'0')||(zfc[k]>'9'&&zfc[k]<'A')||(zfc[k]>'Z'&&zfc[k]<'_')||(zfc[k]>'_'&&zfc[k]<'a')||(zfc[k]>'z')){
					c++;
				}
			}else{
				if((zfc[k]>='\0'&&zfc[k]<'0')||(zfc[k]>'9'&&zfc[k]<'A')||(zfc[k]>'Z'&&zfc[k]<'_')||(zfc[k]>'_'&&zfc[k]<'a')||(zfc[k]>'z')){
					c++;
				}
			}
		}
		if(c>0){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	char sz1[100][21];
	int i,j;
	for(i=0;i<n;i++){
		scanf("%s",sz1[i]);
	}
	int sz2[100];
    for(i=0;i<n;i++){
		sz2[i]=strlen(sz1[i]);
	}
	char sz3[100][10];
	for(i=0;i<n;i++){
        for(j=0;j<sz2[i];j++){
			if(sz1[i][j]<=47||sz1[i][j]>=58&&sz1[i][j]<=64||sz1[i][j]>=91&&sz1[i][j]<=94||sz1[i][j]==96||sz1[i][j]>=123||sz1[i][0]>=48&&sz1[i][0]<=57){
				sz3[i][0]='n';
			    sz3[i][1]='o';
			    sz3[i][2]=0;
				break;
			}else{
				sz3[i][0]='y';
			    sz3[i][1]='e';
				sz3[i][2]='s';
			    sz3[i][3]=0;
			}
		}
	}
	for(i=0;i<n;i++){
		puts(sz3[i]);
	}
	return 0;
}
int main(){
	char s[220];
	int n,i,j,l1=0,l2=0,m;
	scanf("%d",&n);
	for (i=1;i<=n;i++){
		scanf("%s",s);
		l1=1;
		for (m=0;m<=9;m++){
			if (s[0]==48+m){
				l1=0;
				l2=0;
				m=20;
			}
		}
		if (l1==1){
			l2=1;
			for (j=0;s[j]!='\0';j++){
				for (m=0;m<=14;m++){
					if (s[j]==33+m){
						l2=0;
						m=30;
					}
				}
			}
			if (l2==1){
				for (j=0;s[j]!='\0';j++){
					for (m=0;m<=6;m++){
						if (s[j]==58+m){
						l2=0;
						m=30;
						}
					}
				}
				if (l2==1){
					for (j=0;s[j]!='\0';j++){
						for (m=0;m<=5;m++){
							if ((s[j]==91+m)&&(s[j]!='_')){
								l2=0;
								m=30;
							}
						}
					}
					if (l2==1){
						for (j=0;s[j]!='\0';j++){
							for (m=0;m<=3;m++){
								if (s[j]==123+m){
									l2=0;
									m=30;
								}
							}
						}	
					}
				}
			}
		}
		if (l2==1)
			printf("yes\n");
		else printf("no\n");
	}
	return 0;
}
int f(char a[21])
{
	int i,m,b=1,n=0;
	m=strlen(a);
	if((a[0]=='_')||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z'))
	{
		n=1;
	 for(i=1;i<m;i++)
		 if((a[i]=='_')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z')||(a[i]>='0'&&a[i]<='9'))
			 n=n+1;
		 if(n==m)
			 b=0;

	}

	return(b);
}
		

	
void main()
{
	int n,i,b[100];
	char a[100][21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	scanf("%s",a[i]);
	b[i]=f(a[i]);
	}
  for(i=0;i<n;i++)
		if(b[i]==0) printf("yes\n");
		else printf("no\n");
}
void main()
{
	int n,i,j,m,l[100];
	char s[100][20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s[i]);
		l[i]=strlen(s[i]);
	}
	for(i=0;i<n;i++)
	{
		m=0; 
		if(s[i][0]>='0'&&s[i][0]<='9')
				m=1;
		else if(s[i][0]>='A'&&s[i][0]<='Z')
				m=0;
		else if(s[i][0]>='a'&&s[i][0]<='z')
				m=0;
		else if(s[i][0]=='_')
				m=0;
                  else
                         m=1;
	        if(m==0)
		{
		  for(j=1;j<l[i];j++)
		  {
			if(s[i][j]>='0'&&s[i][j]<='9')
				m=0;
			else if(s[i][j]>='A'&&s[i][j]<='Z')
				m=0;
			else if(s[i][j]>='a'&&s[i][j]<='z')
				m=0;
			else if(s[i][j]=='_')
				m=0;
			else 
			{
				m=1;
				break;
			}
		  }
		}
		if(m==1)//&&i!=n-1)
			printf("no\n");
		else if(m==0)//&&i!=n-1)
			printf("yes\n");
		
	}
}
int main()
{
    int i, j, n;                
    char s[MAX+1];               
    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;                   }
        printf(s[j] ? "no\n":"yes\n");
    }   
    return 0;
}
int main(){
	int n,i,j,m=0;
	char s[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
m=0;
		scanf("%s",s);
		for(j=0;s[j];j++){
			if(j==0){
				if(!(s[j]=='_'||(s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z'))){
					m++;
				}
			}else{
				if(!(s[j]=='_'||(s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9'))){
					m++;
				}
			}
		}
		if(m==0){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
int main()
{
	int counter,i,j,n;
	char a[20];
	cin>>n;
	gets(a);
	for (j=0;j<n;j++)
	{
		char a[20];
		counter=0;
		gets(a);
		if ((a[0]>='a'&&a[0]<='z')||a[0]>='A'&&a[0]<='Z'||a[0]=='_')
		{
			for (i=1;a[i]!='\0';i++)
			{
				if (!((a[i]>='a'&&a[i]<='z')||a[i]>='A'&&a[i]<='Z'||a[i]=='_'||(a[i]>='0'&&a[i]<='9')))
				{
					counter++;
					cout<<"no"<<endl;
					break;
				}
			}
			if (!counter)
				cout<<"yes"<<endl;
		}
		else
			cout<<"no"<<endl;
	}
	return 0;
}
int main()
{
	char a[21];
	int i,j,n,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		b=1;
		scanf("%s",a);
		for(j=0;;j++)
		{	
			if(a[j]=='\0')
			{
				break;
			}
				if(a[0]>='0'&&a[0]<='9')
			{
				printf("no\n");
				b=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");
				b=0;
			    break;
			}
			
		}
		if(b==1)
		{
			printf("yes\n");
		}
	}
	return 0;
}
void main()
{
 int m,i,j,flag=0;
 int n[100];
 scanf("%d",&m);
 char a[20][30];
 for(i=0;i<m;i++)
	 scanf("%s",a[i]);
 for(i=0;i<m;i++)
 {
 flag=0;
  if((a[i][0]>='a'&&a[i][0]<='z')||(a[i][0]>='A'&&a[i][0]<='Z')||(a[i][0]=='_'))
  {
	   n[i]=strlen(a[i]);
	  for(j=1;j<n[i];j++)
	  {
	   if((a[i][j]<'0'||a[i][j]>'9')&&(a[i][j]<'a'||a[i][j]>'z')&&(a[i][j]<'A'||a[i][j]>'Z')&&(a[i][j]!='_'))
	   {  printf("no\n");
	   flag=1;
	   break;
	   }
	  }
	  if(flag==0)
		  printf("yes\n");
	}
	else
	printf("no\n");
 }

}
void main()
{
	int n,i,count=0,len,j;
	char zf[30];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",zf);
		len=strlen(zf);
		if((zf[0]>='a'&&zf[0]<='z')||(zf[0]>='A'&&zf[0]<='Z')||zf[0]=='_')
			count++;
		for(j=1;j<len;j++)
		{
			if((zf[j]>='a'&&zf[j]<='z')||(zf[j]>='A'&&zf[j]<='Z')||zf[j]=='_'||(zf[j]>='0'&&zf[j]<='9'))
				count++;
		}
		if(count==len)
			printf("yes\n");
		else
			printf("no\n");
		count=0;
	}
}
int main()
{
    int n,i,j,count=0;
    char a[100][100];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
                    scanf("%s",a[i]);
    }
    for(i=0;i<n;i++)
    {
                    int b=strlen(a[i]);
                    if((a[i][0]>='0')&&(a[i][0]<='9'))
                                    printf("no\n");
                    else
                    {
                           for(j=0;j<b;j++)
                           {
                                             if(((a[i][j]>'9')&&(a[i][j]<'A'))||((a[i][j]>'Z')&&(a[i][j]<'_'))||((a[i][j]>'_')&&(a[i][j]<'a'))||(a[i][j]>'z')||(a[i][j]<'0'))
                                             count++;
                           }
                           if(count>0)
                           printf("no\n");
                           else printf("yes\n");
                           count=0;
                    }
                    
    }
    getchar();
    getchar();
    return 0;
}
int main(){
    char zf[1000][21];
    int jg[1000];
    int n;
    scanf("%d", &n);
    for(int i=0;i<n;i++){
        scanf("%s", zf[i]);
    }
    for(int i=0;i<n;i++){
        for(int t=0;t<strlen(zf[i]);t++){
          if((zf[i][t]>='0')&&(zf[i][t]<='9')){jg[i]=jg[i]+1;}
          if((zf[i][t]>='a')&&(zf[i][t]<='z')){jg[i]=jg[i]+1;}
          if((zf[i][t]>='A')&&(zf[i][t]<='Z')){jg[i]=jg[i]+1;}
          if(zf[i][t]=='_'){jg[i]=jg[i]+1;}
        }}
   for(int i=0;i<n;i++){
         if((zf[i][0]>='0')&&(zf[i][0]<='9')){jg[i]=jg[i]-1;}}
    for(int i=0;i<n;i++){if(jg[i]==strlen(zf[i])){
    printf("yes\n");}else{printf("no\n");}
    }
    return 0;
}
int f(char s[])
{
	int i;
	if(s[0]!='_'&& !(s[0]>64&&s[0]<91) && !(s[0]>96&&s[0]<123))return 0;
	for(i=0;i<strlen(s);i++)if(s[i]!='_'&& !(s[i]>64&&s[i]<91) && !(s[i]>96&&s[i]<123) && !(s[i]>='0'&&s[i]<='9'))return 0;
	return 1;
}
void main()
{
	int n,i;
	char str[50][20];
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%s",str[i]);
	for(i=0;i<n;i++)if(f(str[i]))printf("yes\n");else printf("no\n");
}
void judge(char str[]);
void main()
{
	char c[100][100];
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%s",&c[i]);
	for(i=0;i<n;i++)
		judge(c[i]);
}
void judge(char str[])
{
	int j;
	if(str[0]!='_'&&(str[0]>'Z'||str[0]<'A')&&(str[0]>'z'||str[0]<'a'))
		printf("no\n");
	else
	{
		for(j=1;str[j]!='\0';j++)
		{
			if(str[j]!='_'&&(str[j]>'Z'||str[j]<'A')&&(str[j]>'z'||str[j]<'a')&&(str[j]<'0'||str[j]>'9'))
			{
				printf("no\n");
				break;
			}
		}
		if(str[j]=='\0')
			printf("yes\n");
	}
}
int main(){
	int n,flag=0;
	cin>>n;
	cin.get();
	char a[30];
	for(int i=1;i<=n;i++){
		cin.getline(a,30);
		if(a[0]=='_'||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')){
			for(int j=1;a[j]!='\0';j++){
				if(a[j]=='_'||(a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z')||(a[j]>='0'&&a[j]<='9'))
					continue;
				else{
					cout<<"no"<<endl;
					flag++;
					break;
				}
			}
			if(flag==0)
				cout<<"yes"<<endl;
		}
		else
			cout<<"no"<<endl;
		flag=0;
	}
	return 0;
}
int main()
{
int n,i,o,j,w,b;
char shuzu[1000];
scanf("%d",&n);
getchar();
for(i=0,b=1;i<n;i++,b=1)
{
  gets(shuzu);
  w=strlen(shuzu);
  if(shuzu[0]>='0'&&shuzu[0]<='9')  {printf("no\n");b=0;}
  else for(o=0;o<w;o++) 
       {
        if(!((shuzu[o]>='a'&&shuzu[o]<='z')||(shuzu[o]>='A'&&shuzu[o]<='Z')||(shuzu[o]=='_')||(shuzu[o]>='0'&&shuzu[o]<='9'))) {printf("no\n");b=0;break;}
       }
  if(b==1) printf("yes\n");
}
return 0;
}
int main()
{
int i,j,n;
int a[100]={0};
char s[21];
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]=='_')){
for(j=1;s[j]!='\0';j++){
if((s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]=='_')||(s[j]>='0'&&s[j]<='9')) a[i]=1;
else{
a[i]=0;
break;}}}}
for(i=0;i<n;i++){
if(a[i]==1) printf("yes\n");
else printf("no\n");}
return 0;
}
int main(){
    int n,m=0,i,j;
    char sz[N];
    scanf("%d",&n);
    for(j=0;j<n;j++){
        scanf("%s",sz);
    if((sz[0]=='_')||(sz[0]>='A'&&sz[0]<='Z')||(sz[0]>='a'&&sz[0]<='z')){
        for(i=1;sz[i];i++){
        if((sz[i]=='_')||(sz[i]>='0'&&sz[i]<='9')||(sz[i]>='a'&&sz[i]<='z')||(sz[i]>='A'&&sz[i]<='Z')){
            continue;
        }else m++;
    }if(m!=0){
        m=0;
        puts("no");
        }else{
            puts("yes");
        }
    }else {puts("no");
    }}return 0;
}
int main()
{
	char a[50];
	int b[50],c,l,n;
	int i,j;

	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		l=strlen(a);
		c=a[0];
		if(c>=65&&c<=90||c==95||c>=97&&c<=122)
		{
			for(j=1;j<l;j++)
			{
				c=a[j];
				if(c>=65&&c<=90||c==95||c>=48&&c<=57||c>=97&&c<=122)
					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 if(b[i]==0)
			printf("no\n");
	}
	return 0;
}
int main(){
	int n,i,k,sz[20];
	scanf("%d",&n);
	char a[20][20];
	for(i=0;i<n;i++){
		scanf("%s",a[i]);
	}
	for(i=0;i<n;i++){
		for(k=1;a[i][k]!='\0';k++){
			if(((a[i][0]<91)&&(a[i][0]>64))||((a[i][0]<123)&&(a[i][0]>96))||(a[i][0]=='_')){
		    	if(((a[i][k]<='9')&&(a[i][k]>='0'))||((a[i][k]<='z')&&(a[i][k]>='a'))||((a[i][k]<='Z')&&(a[i][k]>='A'))||(a[i][k]=='_')){
				   sz[i]=1;
				}else{
				   sz[i]=0;
				   break;
				}
			}else{
				sz[i]=0;
				break;
			}
		}
	}
	for(i=0;i<n;i++){
		if(sz[i]==0){
			printf("no\n");
		}else{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
	int n,i,j=0,m=1;	
	scanf("%d",&n);

	char word[10000][22];
	for(i=0;i<n;i++){
		scanf("%s",word[i]);
	}
	for(i=0;i<n;i++){
		j=0;
		m=1;
		while(word[i][j]!='\0'){
			if(((word[i][j]=='_')
				||(word[i][j]>='a'&&word[i][j]<='z')
				||(word[i][j]>='A'&&word[i][j]<='Z')
				||((word[i][j]>='0')&&(word[i][j]<='9')&&(j>0)))){
				j++;

			}else{
				m=0;
				break;
				
			}
			
		}
		if(m==1){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	
	return 0;
}
int main (){
	char str[21];
	int sz[21]={0};
	int l,n,i,m;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%s",&str);
		l= strlen(str);
		for(m=0;m<l;m++){
			if((str[m]<='z'&&str[m]>='a')||str[m]=='_'||(str[m]<='Z'&&str[m]>='A')||(str[m]<='9'&&str[m]>='0'))
			{sz[i]=1;
			}else{
			sz[i]=0	;
			break;
			}
		}
			if (str[0]=='9'||str[0]=='8'||str[0]=='7'||str[0]=='6'||str[0]=='5'||str[0]=='4'||str[0]=='3'||str[0]=='2'||str[0]=='1'||str[0]=='0'){
				sz[i]=0;
			}
	}

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

		
	
	return 0;
}
int main()
{
  int n,i,j,b=1;
  char a[100][20];
  scanf("%d",&n);
  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'))
	  {
		  for(j=1;j<=20;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'))
			  {
				  continue;
			  }
			  else if(a[i][j]!='\0')
			  {
				  printf("no\n");
				  b=0;
				  break;
			  }
			  else
				  break;
		  }
		  if(b==1)
		  {printf("yes\n");}
		  b=1;
	  }
	  else
	  {
		  printf("no\n");
	  }
  }

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

	scanf("%d",&n);
	scanf("\n");
	
	while(n--)
	{
		char str[21];
		gets(str);
		int i;
		char a=str[0];
		if (!((a>='a'&&a<='z')||(a>='A'&&a<='Z')||(a=='_')))
		{
			puts("no");
			continue;
		}

		for(i=1;i<strlen(str);i++)
		{
			a = str[i];
			if (!((a>='a'&&a<='z')||(a>='A'&&a<='Z')||(a=='_')||(a>='0'&&a<='9')))
			{
				puts("no");
				break;
			}
		}

		if(i>=strlen(str))
			puts("yes");
	}

	return 0;
}
int main()
{
	char a[19];
	int n,i,j,d,len;
	scanf("%d",&n);
	for(i=1;i<=n+1;i++)
	{
		gets(a);
		len=strlen(a);
		d=0;
		for(j=0;j<=len-1;j++)
		{
			if(       ( (a[0] >= '9') ||( a[0] <'0' ) )&&      ( (a[j]>='a' && a[j]<='z') || (a[j]>='A' && a[j]<='Z') || (a[j]=='_') || (a[j]>='0' && a[j]<='9') ))
			{
				continue;
			}
			else
			{
				d++;
				printf("no\n");
				break;
			}
		}
		if((d==0)&&(i!=1))
		{
			printf("yes\n");
		}
	}
	return 0;
}
int main(){
  int n,i,j;
  scanf("%d",&n);
  char s[21];
  for(i=0;i<n;i++){
    for(j=0;j<21;j++)s[i]=0;
    scanf("%s",s);
    if((s[0]<'A'||s[0]>'z'||(s[0]<'a'&&s[0]>'Z'))&&s[0]!='_')
      {printf("no\n");goto m;}
    for(j=1;s[j]!='\0';j++){
      if((s[j]<'0'||s[j]>'z'||(s[j]>'9'&&s[j]<'A')||(s[j]<'a'&&s[j]>'Z'))&&s[j]!='_')
      {printf("no\n");goto m;}
     }
    printf("yes\n");
    m:;
  }
  return 0;
}
int main(){
    int n,i,s[100],j;
    scanf("%d",&n);
    char a[n][20];
    for(i=0;i<n;i++){
        scanf("%s",a[i]);
         }
         for(i=0;i<n;i++){
             s[i]=0;
             for(j=0;a[i][j]!='\0';j++){
                 if(j==0){
                     if((a[i][j]>='A'&&a[i][j]<='Z')||(a[i][j]>='a'&&a[i][j]<='z')||(a[i][j]=='_')) s[i]=1;
                     else {s[i]=0;break;}
                 }
                 else 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')) s[i]=1;
                 else {s[i]=0; break;}
             }     if(s[i]==0) printf("no\n");else printf("yes\n"); 
         }
         
         return 0;
}
int main(){
    int n;
    int sum=0;
    int m[1000];
    char c[1000][22];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%s",c[i]);
        m[i]=strlen(c[i]);
      //  printf("%s\n",c[i]);
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<m[i];j++){
            if(((c[i][0]>='A'&&c[i][0]<='Z')||(c[i][0]>='a'&&c[i][0]<='z')||c[i][0]=='_')&&((c[i][j]>='A'&&c[i][j]<='Z')||(c[i][j]>='a'&&c[i][j]<='z')||c[i][j]=='_'||(c[i][j]>='0'&&c[i][j]<='9')))
            sum++;
        }
        if(sum==m[i])printf("yes\n");
        else printf("no\n");
        sum=0;
    }
}
int main()
{
    int n,i,j;
    char s[32];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%s",&s);
        for(j=0;j<32;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");
    } 
    getchar();
    getchar();
    getchar();
    return 0; 
}
int main(){
    int n;
    char str[21];
    scanf("%d",&n);
    for(int j=0;j<n;j++){
        scanf("%s",str);
        for(int i=0;str[i]!='\0';i++){
            if(i==0){
                if(((str[i]>='a')&&(str[i]<='z'))||((str[i]>='A')&&(str[i]<='Z'))||(str[i]=='_')){
                    continue;
                } else{
                    printf("no\n");
                    break;
                }
            }
            if(i>0){
                if(((str[i]>='a')&&(str[i]<='z'))||((str[i]>='A')&&(str[i]<='Z'))||((str[i]>='0')&&(str[i]<='9'))||(str[i]=='_')){
                    if(str[i+1]!='\0'){
                        continue;
                    } else{
                        printf("yes\n");
                    }
                } else{
                    printf("no\n");
                    break;
                }
            }
        }
    }
    return 0;
}
int main(){
    int n,j,i,g;
    cin>>n;
    int bb[n+1];
    char aa[n+1][100];
    for(i=1;i<=n;i++){
    cin>>aa[i];
    g=0;
    if(!(aa[i][0]=='_'||aa[i][0]<=122&&aa[i][0]>=97||aa[i][0]<=90&&aa[i][0]>=65)){
         g=1;
         }
    else {
         j=1;
         while(aa[i][j]!='\0'){
           if(!(aa[i][j]=='_'||aa[i][j]<=122&&aa[i][j]>=97||aa[i][j]<=90&&aa[i][j]>=65||aa[i][j]<=57&&aa[i][j]>=48)){
            g=1;
            break;
            }
            j++;
            }
            }
         bb[i]=g;
         }
    for(i=1;i<=n;i++){
     if(bb[i]==1)
     cout<<"no"<<endl;
     else cout<<"yes"<<endl;
     }
   
     return 0;
     }
//??C???
int main()
{
	char a[100][20];
	int n,i,j;
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a[i];
		for (j=0;a[i][j]!='\0';j++)
		{
			if (j==0)//???????
			{
				if ((a[i][0]>='a'&&a[i][0]<='z')||(a[i][0]>='A'&&a[i][0]<='Z')||a[i][0]=='_')
					continue;
				else
				{
					cout<<"no"<<endl;
					break;
				}
			}
			else//????????
			{
				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'))
				{
					if (a[i][j+1]!='\0')
						continue;
					else
						cout<<"yes"<<endl;
				}
				else
				{
					cout<<"no"<<endl;
					break;
				}
			}
		}
	}
	return 0;
}