semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,j,i;
	scanf("%d",&n);
	char a[100],c;
for(i=0;i<n;i++){
	a[0]=' ';
	
		scanf("%s",a);
     for(j=0;j<strlen(a);j++){
		if(a[0]!='0'&&
			a[0]!='1'&&
a[0]!='2'&&a[0]!='3'&&a[0]!='4'&&a[0]!='5'&&
a[0]!='6'&&a[0]!='7'&&a[0]!='8'&&a[0]!='9'&&(

			(a[j]>='a'&&a[j]<='z')||(a[j]=='_')||
	(a[j]>='A'&&a[j]<='Z')||(a[j]>='0'&&a[j]<='9')))
	continue;
		else printf("no\n");break;}
	 if(j==strlen(a))printf("yes\n");
}
	
	
	
	return 0;
}
int main(){
	char zfc[25];
	int n,i,j,a;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zfc);
		a=0;
		for(j=0;zfc[j]!='\0';j++){
			if(j==0&&
				(zfc[j]=='_'||
				(zfc[j]>='a'&&zfc[j]<='z')||
				(zfc[j]>='A'&&zfc[j]<='Z'))){
				a=1;}
			else if(j>0&&
				(zfc[j]=='_'||
				(zfc[j]>='a'&&zfc[j]<='z')||
				(zfc[j]>='A'&&zfc[j]<='Z')||
				(zfc[j]>='0'&&zfc[j]<='9'))){
				a=1;}
			else{a=0;}
			if(a==0){break;}
		}
		if(a==0){printf("no\n");}
		else{printf("yes\n");}
	}
	return 0;
}
int main(){
    char a[21]={0};
    int n,h,t,p[1000]={0},q[1000]={0};
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%s",a);
        h=0;
        h=strlen(a);
        p[i]=h;
        for(t=0;t<h;t++){
        if(t==0){
            if(a[0]=='_'||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')){
            q[i]++;}}
            if(t!=0){
                if(a[t]=='_'||(a[t]>='a'&&a[t]<='z')||(a[t]>='A'&&a[t]<='Z')||(a[t]>='0'&&a[t]<='9'))
        {q[i]++;}
    }
}
if(q[i]==p[i]){
        printf("yes\n");}
        else
        {printf("no\n");}
    }
        return 0;}
int main(){
	int r,n,i,j,num,a=0;
	char str[100][21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",str[i]);
	}
	for(i=0;i<n;i++){
		num=0;
		r=strlen(str[i]);
		if(str[i][0]<65||(str[i][0]>90&&str[i][0]<97)||(str[i][0]>122)){
			if(str[i][0]!='_'){
				printf("no\n");
				continue;
			}
		}
		for(j=0;j<r;j++){
				if((str[i][j]>=65&&str[i][j]<=90)||(str[i][j]>=97&&str[i][j]<=122)||str[i][j]=='_'||(str[i][j]>=48&&str[i][j]<=57))num++;
		}
		if(num==r)printf("yes\n");
		if(num!=r)printf("no\n");
	}



	return 0;
}
int main()
{
	char sz[50];
	int n;
	scanf("%d",&n);
	int count,x;
	for(int j=1;j<=n;j++)
	{
		count=0;
		x=0;
		scanf("%s",sz);
		for(int i=0;sz[i]!='\0';i++)
		{
			x++;
			if(sz[0]=='_'||(sz[0]>='a'&&sz[0]<='z')||(sz[0]>='A'&&sz[0]<='Z'))
			{
				if(sz[i]>='0'&&sz[i]<='9')
					count++;
			    if(sz[i]>='a'&&sz[i]<='z')
				    count++;
			    if(sz[i]>='A'&&sz[i]<='Z')
				    count++;
			    if(sz[i]=='_')
				    count++;
			}
		}
		if(count==x){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
void main()
{
	int n,i,j,flag;
	char str[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		flag=1;
		scanf("%s",&str);
		if(str[0]<=64||str[0]>=123||(str[0]>=91&&str[0]<=94)||str[0]==96)
		{
			printf("no\n");
			flag=0;
			continue;
		}
		for(j=1;j<strlen(str);j++)
		{
			if(str[j]<=47||(str[j]<=64&&str[j]>=58)||str[j]>=123||(str[j]>=91&&str[j]<=94)||str[j]==96)
			{
				printf("no\n");
				flag=0;
				break;
			}
		}
		if(flag==1)
		{
			printf("yes\n");
		}
	}
}
int main()

{
    int n,i,j,point,flag;
    scanf("%d",&n);
char*lab=(char*)malloc(n*20*sizeof(char));
for(i=0;i<n;i++)
    scanf("%s",lab+i*20);
/*for(i=0;i<n;i++)
    puts(lab+i*20);*/
for(i=0;i<n;i++)
{

    for(j=0,flag=0;*(lab+20*i+j)!='\0';j++)
        {
        point=20*i+j;
        if(j==0)
               {
            if (*(lab+point)=='_'||(*(lab+point)>='A'&&*(lab+point)<='Z')||(*(lab+point)>='a'&&*(lab+point)<='z'))
                continue;
                else { //printf("%c\ni is %d\nj is %d\n",*(lab+point),i,j);
                        flag=1;
                        break;
                     }
                }
            else
                if( !((*(lab+point)>='A'&&*(lab+point)<='Z')||(*(lab+point)>='a'&&*(lab+point)<='z'))&& *(lab+point)!='_'   &&  !(*(lab+point)>='0'&&*(lab+point)<='9'))
                    {//printf("%c\ni is %d\nj is %d\n",*(lab+point),i,j);
                        flag=1;
                        break;
                    }
        }
    // printf("flag is %d",flag);
     if(flag)
        printf("no\n");
     else
        printf("yes\n");
}
return 0;
}
int main(){
    char zf[21];
    int n,m,a;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        a=1;
        scanf("%s",zf);
        m=strlen(zf);
        if(zf[0]==95||(zf[0]>=65&&zf[0]<=90)||(zf[0]>=97&&zf[0]<=122)){
            a=a*1;
        }else{
            a=a*0;
        }
        for(int x=1;x<m;x++){
            if(zf[x]==95||(zf[x]>=65&&zf[x]<=90)||(zf[x]>=97&&zf[x]<=122)||(zf[x]>=48&&zf[x]<=57)){
                a=a*1;
            }else{
                a=a*0;
            }
        }
        if(a==1){
            printf("yes");
        }else{
            printf("no");
        }
        printf("\n");
    }
    return 0;
}
int main(int argc, char* argv[])
{
    int n,i,j,isbreak;
	char s[21];
	scanf ("%d",&n);
	for (j=0;j<n;j++)
	{
		isbreak=0;
		scanf ("%s",s);
	    if (s[0]=='_'||(s[0]<='Z'&&s[0]>='A')||(s[0]<='z'&&s[0]>='a'))
			{  
			   for (i=1;s[i]!='\0';i++)
			   {
				   if (s[i]=='_'||(s[i]<='Z'&&s[i]>='A')||(s[i]<='z'&&s[i]>='a')||(s[i]<='9'&&s[i]>='0'))
                       continue;
				   else 
				   {
					   isbreak=1;
					   printf ("no\n");
					   break;
				   }
			   }
		}  
	     else 
				 {
					printf("no\n");
					isbreak=1;
				  }
			   
		 if (isbreak==1)
			 continue;
		 else if (isbreak==0)
		 {
			 printf ("yes\n");
		     continue;
		 }
		 }
        return 0;
}
int main()
{
 int n,i,j;
 char **string;
 scanf("%d", &n);
 //??????
 string=(char**)malloc(sizeof(char*)*n);
 for (i=0;i<n;i++)
 {
  string[i]=(char*)malloc(sizeof(char)*20);
  scanf("%s",string[i]);//??????????????????
 }
 
 for (i=0;i<n;i++)
 {
  if (!((string[i][0]>='A' && string[i][0]<='Z') ||
    (string[i][0]>='a' && string[i][0]<='z') ||
    string[i][0]=='_'))//??????????????????????????
  {
   printf("no\n");
   continue;
  }
  for (j=1;string[i][j];j++)//????????????string[i][j]?0??false?for?????
  {
   if (!((string[i][j]>='0' && string[i][j]<='9') ||
    (string[i][j]>='A' && string[i][j]<='Z') ||
    (string[i][j]>='a' && string[i][j]<='z') ||
    string[i][j]=='_'))//??????????????????
   {
    j=0;
    break;
   }
  }
  if (j) printf("yes\n");
  else printf("no\n");
 }
 
 //??????
 for (i=0;i<n;i++)
  free(string[i]);
 free(string);
 return 0;
}
int main() {
	int n;
	cin >> n;
	while (n--) {
		char str[32];
		cin >> str;
		int i, l = strlen(str);
		if ('0'<=str[0]&&str[0]<='9') {
			cout << "no\n";
			continue;
		}
		for (i = 0; i < l; ++i) {
			if ('0'<=str[i]&&str[i]<='9') continue;
			if ('a'<=str[i]&&str[i]<='z') continue;
			if ('A'<=str[i]&&str[i]<='Z') continue;
			if (str[i]=='_') continue;
			break;
		}
		if (i == l) {
			cout << "yes\n";
		} else {
			cout << "no\n";
		}
	}
}
int panduan(char str[])
{
 int n,i;
 n=strlen(str);
 if((str[0]!='_')&&((str[0]<65)||(str[0]>122)||((str[0]>90)&&(str[0]<97))))
  return 0;
 else
  for(i=0;i<n;i++)
  {
   if((str[i]!='_')&&((str[i]<48)||(str[i]>122)||((str[i]>90)&&(str[i]<97))||((str[i]>57)&&(str[i]<65))))
    return 0;
  }
  return 1;
}
int main()
{
 int n,i,a;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  char ch[100];
	scanf("%s",ch);
  a=panduan(ch);
  if(a)
   printf("yes\n");
  else
   printf("no\n");
 }
 return 0;
}
int main(){
    int n,i;char a[50]={0};
    cin>>n;
    while(n--){
        cin>>a;
        if(isdigit(a[0])){
            cout<<"no"<<endl;
            continue;
        }
        for(i=0;a[i]!=0;++i){
            if(a[i]==95||isupper(a[i])||islower(a[i])||isdigit(a[i]))
                continue;
            else break;
        }
        a[i]==0?cout<<"yes"<<endl:cout<<"no"<<endl;
    }
}
int n;
int check(char a[])
{
	int i,l;
	l=strlen(a);
	if((a[0]=='_')||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z'))
		i=1;
	else return 0;
	for(i=1;i<l;i++)
	{
		 if((a[i]>='0'&&a[i]<='9')||(a[i]=='_')||(a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z'))
			 continue;
		 else return 0;
	}
	return 1;
}
void main()
{
	int n,j,k;
	char arr[21];
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{
		scanf("%s",arr);
		k=check(arr);
		if(k==0)
			printf("no\n");
		else
			printf("yes\n");
	}
}
int main()
{
    int n;
    int i,j;
    scanf("%d",&n);
    char sz[21];
    for(i=0;i<n;i++)
    {
        int zs=1;
        scanf("%s",sz);
        if(sz[0]>='0'&&sz[0]<='9')
        {
            zs=0;
        }else{
        for(j=0;sz[j];j++)
        {
            if(!((sz[j]=='_')||(sz[j]>='0'&&sz[j]<='9')||(sz[j]>='a'&&sz[j]<='z')||(sz[j]>='A'&&sz[j]<='Z')))
               {
                   zs=0;
               }
    }
        }
        if(zs==1)
            {
                printf("yes\n");
            }
          if(zs==0)
            {
                printf("no\n");
            }
    }
    return 0;
}
int main(int argc, char* argv[])
{
	int m=0,n,i,j,l;
	char a[21];
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		m=0;
		gets(a);
		l=strlen(a);
		for(j=0;a[j]!='\0';j++)
		{ 
			if((j==0&&(a[j]>='a'&&a[j]<='z'||a[j]>='A'&&a[j]<='Z'||a[j]=='_'))||(j!=0&&(a[j]>='a'&&a[j]<='z'||a[j]>='A'&&a[j]<='Z'||a[j]=='_'||a[j]>=48&&a[j]<=57)))
			{
			       m++;
			}
		}
		if(m!=l)
			printf("no\n");
		if(m==l)
			printf("yes\n");
	}
	return 0;
}
int main(){
    int n,i,j;
    char sz[21];
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		gets(sz);
		if((sz[0]=='_')||(sz[0]>='a'&&sz[0]<='z')||(sz[0]>='A'&&sz[0]<='Z')){
			for(j=1;sz[j]=='_'||(sz[j]>='a'&&sz[j]<='z')||(sz[j]>='A'&&sz[j]<='Z')||(sz[j]>='0'&&sz[j]<='9');j++){
				j=j;
			}
			if(sz[j]=='\0'){
				printf("yes\n");
			}
			else{
				printf("no\n");
			}
		}
		else{
			printf("no\n");
		}
	}
	return 0;
}
char st[100][21];
int n,i,boo;
int check(char s)
{
    int m,j;
    m=strlen(st[s]);
    if (st[s][0]<=57&&st[s][0]>=48)
    return 0;
    for (j=0;j<m;j++)
    {
        if (st[s][j]<48||st[s][j]>57&&st[s][j]<65||st[s][j]>122||st[s][j]>90&&st[s][j]<97&&st[s][j]!=95)
        {
        return 0;
        }
    }
    return 1;
}
int main()
{
    scanf("%d\n",&n);
    for (i=0;i<n;i++)
    gets(st[i]);
    for (i=0;i<n;i++)
    {
        boo=check(i);
        if (boo==1)
        printf("yes\n");
        else printf("no\n");
    }
    return 0;
}
void main()
{
	char s[100][21];
	int n;
	int i,j;

	scanf("%d",&n);

	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'))
			printf("no\n");
		else 
			for(j=1;j<strlen(s[i]);j++)
			{
				if(s[i][j]!='_'&&(s[i][j]<'0'||(s[i][j]>'9'&&s[i][j]<'A')||(s[i][j]>'Z'&&s[i][j]<'a')||s[i][j]>'z'))
				{
					printf("no\n");
					break;
				}
			}

			if(j==strlen(s[i]))
					printf("yes\n");
	}
}
int main(int argc, char* argv[])
{
	int n,i,j,len;
	char ch[21],m[10];
	gets(m);
	n=atoi(m);
	for(i=0;i<n;i++)
	{
		gets(ch);
		len=strlen(ch);
		for(j=0;j<len;j++)
		{
			if(j==0)
			{
			if((ch[j]<'A'||ch[j]>'Z')&&(ch[j]<'a'||ch[j]>'z')&&ch[j]!='_')
				break;
			}
			else
			{
			if((ch[j]<'A'||ch[j]>'Z')&&(ch[j]<'a'||ch[j]>'z')&&ch[j]!='_'&&(ch[j]<'0'||ch[j]>'9'))
				break;
			}
		}
		if(j==len)
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
main(){
	char a[21];
	long i, n, l, j, m;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		m=0;
		scanf("%s", a);
		l=strlen(a);
		if((a[0]!='_' && (a[0]-65)*(a[0]-90)*(a[0]-97)*(a[0]-122)>0) || a[0]<47){
			printf("no\n");
			m++;
		}
		else{
			for(j=1; j<l; j++){
				if((a[j]!='_' && (a[j]-48)*(a[j]-57)*(a[j]-65)*(a[j]-90)*(a[j]-97)*(a[j]-122)>0) || a[j]<47){
					printf("no\n");
					m++;
				}
				else;
				if(m>0) break;
				else;
			}
		}
		if(m>0) continue;
		else printf("yes\n");
	}
}
int main()
{
	int n,i,j,len;
	char zf[21];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zf);
		len=strlen(zf);
		for(j=0;j<len;j++){
			if(j==0){
				if((zf[j]<'a'||zf[j]>'z')&&zf[j]!='_'){
					if(zf[j]<'A'||zf[j]>'Z'){
						printf("no\n");
						break;
					}
				}
			}else{
				if((zf[j]<'a'||zf[j]>'z')&&zf[j]!='_'){
					if(zf[j]<'A'||zf[j]>'Z'){
						if(zf[j]<'0'||zf[j]>'9'){
							printf("no\n");
							break;
						}
					}
				}
			}
		}
		if(j==len)
			printf("yes\n");
	}
	return 0;
}
int main()
{
	char a[100];
	int x,i,j,k,l=0;
	cin>>x;
	cin.get();
	for(i=0;i<x;i++)
	{
		k=0;
		cin.getline(a,100,'\n');
		if(a[0]>='0'&&a[0]<='9')
			k++;
		for(j=0;j<strlen(a);j++)
		{
			if((a[j]>='A'&&a[j]<='Z')||(a[j]>='a'&&a[j]<='z')||(a[j]>='0'&&a[j]<='9')||(a[j]=='_'))
				l++;
			else
				k++;
		}
		if(k>0)
			cout<<"no"<<endl;
		else
			cout<<"yes"<<endl;
	}
	return 0;
}
void main()
{
	char a[100][20];
	int n,i,j,l,flag=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a[i]);
	}
	for(i=0;i<n;i++)
	{
		flag=0;
		l=strlen(a[i]);
		if(l>31)
		{
			printf("no\n");
			continue;
		}
		if(a[i][0]<'A'||a[i][0]>'z')
		{
			printf("no\n");
			continue;
		}
		if(a[i][0]>'Z'&&a[i][0]<'a'&&a[i][0]!='_')
		{
			printf("no\n");
			continue;
		}
		for(j=1;j<l;j++)
		{
			if(a[i][j]<'0'||a[i][j]>'z')
			{
				printf("no\n");
				flag=1;
				break;
			}
			if(a[i][j]>'9'&&a[i][j]<'A')
			{
				printf("no\n");
				flag=1;
				break;
			}
			if(a[i][j]>'Z'&&a[i][j]<'a'&&a[i][j]!='_')
			{
				printf("no\n");
				flag=1;
				break;
			}
		}
		if(flag==0)
			printf("yes\n");
	}
}
void main()
{
  char ch[MAX][50],tmp;
  int n;
  int i=0,j=1;
  scanf("%d",&n);
  for(i=0;i<n;i++)
    {
    scanf("%s",ch[i]);
    }
  for(i=0;i<n;i++)
    {tmp=ch[i][0];
     if((tmp>='A'&&tmp<='Z')||(tmp>='a'&&tmp<='z')||(tmp=='_'));
     else
       {
  printf("no\n");
  continue;
       }
     j=1;
     while(ch[i][j]!='\0')
       {  tmp=ch[i][j];
  if((tmp>='A'&&tmp<='Z')||(tmp>='a'&&tmp<='z')||(tmp=='_')||(tmp>='0'&&tmp<='9'));
  else  {printf("no\n");   break;}
  j++;
       }
     if(ch[i][j]=='\0')  printf("yes\n");
    }
}
int range(char x[])
{
	int i,len;
	len=strlen(x);
	for(i=0;i<len;i++)
		if(x[i]<48||x[i]>57&&x[i]<65||x[i]>90&&x[i]<95||x[i]>95&&x[i]<97||x[i]>122)
			return(0);
	return(1);
}
int first(char x[])
{
	if(x[0]>=48&&x[0]<=57)
		return(0);
	else return(1);
}
main()
{
	int n,i;
	char x[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",x);
		if(range(x)==1&&first(x)==1)
			printf("yes\n");
		else printf("no\n");
	}
}
int main()
{
	int n,i,j,len,a;
	char s[21];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		a=0;
		scanf("%s",&s);
		len=strlen(s);
		for(j=0;j<len;j++)
		{
			if((s[j]=='_')||(s[j]>='a'&&s[j]<='z')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='0'&&s[j]<='9'&&j>0))
			{
				a++;
			}
		}
		if(a<len)
		{
			printf("no\n");
		}
		if(a==len)
		{
			printf("yes\n");
		}
	}
	return 0;
}
int main()
{
	int n,i,j,l;char a[20][20];
	cin >> n;
	for(i=0;i<n;i++)
		cin >> a[i];
	for(i=0;i<n;i++)
	{
		l=strlen(a[i]);
		if((a[i][0]>=65&&a[i][0]<=90)||(a[i][0]>=96&&a[i][0]<=122)||(a[i][0]=='_'))
		{
			int num=1;
			for(j=1;j<20;j++)
			{
				if(!((a[i][j]>=65&&a[i][j]<=90)||(a[i][j]>=97&&a[i][j]<=122)||(a[i][j]=='_')||(a[i][j]>='0'&&a[i][j]<='9')))break;
				num++;
			}
			if(num==l)
				cout << "yes"  << endl;
			else
				cout << "no" << endl;
		}
		else cout << "no" << endl;
	}
	return 0;
}
int main()
{
	int n;
	char a[25];
	scanf("%d",&n);
	int i,k,l,j;
	for(i=1;i<=n;i++)
	{
		scanf("%s",&a);	
		l=strlen(a);
		k=1;
		if(a[0]==95 || (a[0]<='z'&& a[0]>='a') || (a[0]<='Z'&& a[0]>='A') )
		{a[0]=1;}
		else {a[0]=0;}
		for(j=1;j<l;j++)
		{
			if( (a[j]<='z'&& a[j]>='a') || (a[j]<='Z'&& a[j]>='A' )
				|| (a[j]<='9' &&  a[j]>='0') || a[j]==95)
			{a[j]=1;}
			else {a[j]=0;}
		}
		for(j=0;j<l;j++)
		{
			k=k*a[j];
		}
		if(k==1)printf("yes\n");
		if(k==0)printf("no\n");
	}
	return 0;
}
void judge(char s[]);
void main()
{
	char st[100][20],n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",st[i]);
	}
	for(i=0;i<n;i++)
	{
		judge(st[i]);
	}
}
void judge(char s[])
{
    int i,temp=-1;
	if((s[0]>='a'&&s[0]<='z')||(s[0]=='_')||(s[0]>='A'&&s[0]<='Z'))
	{
		for(i=1;i<20;i++)
		{
			if(s[i]=='\0')
				break;
			else if((s[i]>='a'&&s[i]<='z')||(s[i]=='_')||(s[i]>='A'&&s[i]<='Z')||(s[i]>='0'&&s[i]<='9'))
			{
				temp=1;
			}
			else
			{
				temp=-1;
				break;
			}
		}
	}
	else 
	{
		temp=-1;
	}
	if(temp==1)
	{
		printf("yes\n");
	}
	else
	{
		printf("no\n");
	}
}
int main(){
	int n,i,j;
	char z[500][500];
	int a[500],d[500]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",z[i]);
		a[i]=strlen(z[i]);
	}
	for(i=0;i<n;i++){
		for(j=1;j<a[i];j++){
			if((z[i][0]>='A'&&z[i][0]<='Z')||(z[i][0]=='_')||(z[i][0]>='a'&&z[i][0]<='z')){
				if((z[i][j]>='A'&&z[i][j]<='Z')||(z[i][j]=='_')||(z[i][j]>='a'&&z[i][j]<='z')||(z[i][j]>='0'&&z[i][j]<='9')){
			d[i]=1;
		}else{
			d[i]=0;
			break;
		}
		}
		}
	}
	for(i=0;i<n;i++){
		if(d[i]==1){
             printf("yes\n");
		}else{
             printf("no\n");
		}
	}
	return 0;

}
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
		{
		char c[21]={0};
		scanf("%s",c);
		int len=strlen(c),judge=0;
		if(!isalpha(c[0])&&c[0]!='_')
			{
			printf("no\n");
			judge=1;
			} 	
		else
			{
			for(int j=1;j<len;j++)
				{
				if(!isalnum(c[j])&&c[j]!='_')
					{
					printf("no\n");
					judge=1;
					break;	
					}	
				}	
			}
		if(judge==0)
			printf("yes\n");	
		}
}
int main()
{
	int n,len,flag;
	char str[21];
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>str;
		//cin.getline(str,21); 
		len=strlen(str);
		for(int j=0;j<len;j++)
		{
			if(j==0)
			{
			if(str[0]=='_'||(str[0]>='a'&&str[0]<='z')||(str[0]>='A'&&str[0]<='Z'))
				flag=0;
			else
				flag=1;
			}
			else if(str[j]=='_'||(str[j]>='a'&&str[j]<='z')||(str[j]>='A'&&str[j]<='Z')||(str[j]>='0'&&str[j]<='9'))
				flag=flag;
			else
				flag=1;
		}
		if(flag==0)
				cout<<"yes"<<endl;
			else
				cout<<"no"<<endl;
	}
	return 0;
}
int main()
{
	int n,i,p,k,m,o;
	char zfc[100][100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",zfc[i]);
	}
	for(i=0;i<n;i++){
		o=0;
		p=strlen(zfc[i]);
		if((zfc[i][0]>=65&&zfc[i][0]<=90)||(zfc[i][0]>=97&&zfc[i][0]<=122)||zfc[i][0]==95){
			o=o;
		}else{
			o=o+1;
		}
		for(k=1;k<p;k++){
			m=zfc[i][k];
			if((m>=65&&m<=90)||(m>=97&&m<=122)||(m>=48&&m<=57)||(m==95)){
				o=o;
			}else{
				o=o+1;
			}
		}
		if(o==0){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
int main(){
    int i,j,n,b[100]={0};
    char s[100][21];
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%s",s[i]); 
        for(j=0;s[i][j]!=0;j++){
            if ((s[i][0]=='_')||(s[i][0]>='A'&&s[i][0]<='Z')||(s[i][0]>='a'&&s[i][0]<='z')){
                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)){
                    continue;
                }else{
                    b[i]++;
                    break;
                }
            }else{
                b[i]++;
                break;
            }
        }
    }
    for(i=1;i<=n;i++){
        if(b[i]>0){
            printf("no\n");
        }else{
            printf("yes\n");
        }
    }
    return 0;
 }
int main(){
    int n;
    int a[100]={0};
    scanf("%d\n",&n);
    char bsf[n][21];
    for (int i=0;i<n;i++){
        scanf("%s",(bsf[i]));
    }
    for (int i=0;i<n;i++){
        for(int m=0;bsf[i][m]!=0;m++){
        if((bsf[i][0]>='a'&&bsf[i][0]<='z')||(bsf[i][0]>='A'&&bsf[i][0]<='Z')||(bsf[i][0]=='_')){
         if((bsf[i][m]>='a'&&bsf[i][m]<='z')||(bsf[i][m]<='Z'&&bsf[i][m]>='A')||(bsf[i][m]>='0'&&bsf[i][m]<='9')||bsf[i][m]=='_'){
           continue;
        }else{
            a[i]++;
            break;
        }
      }else{
          a[i]++;
          break;
      }
        }
    }
    for(int i=0;i<n;i++){
        if(a[i]>0){
            printf("no\n");
        }else{
            printf("yes\n");
        }
    }
return 0;  
}
int main(){
	int i,j,n;
	char s[2000];
	int r=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		r=0;
		scanf("%s",s);
		if((s[0]>='A'&&s[0]<='Z')||(s[0]>='a'&&s[0]<='z')||(s[0]=='_')){
			for(j=0;s[j]!='\0';j++){
				if((s[j]>='0'&&s[j]<='9')||(s[j]>='A'&&s[j]<='Z')||(s[j]>='a'&&s[j]<='z')||s[j]=='_'){
					r=0;
				}else{
					r=1;
				}
				if(r==1){
					break;
				}
			}
		}else{
			r=1;
		}
		if(r==0){
			printf("yes\n");
		}else{
			printf("no\n");
		}
	}
	return 0;
}
int dx(char c)
{if ((c>='A')&&(c<='Z')) return 7;
 else return 0;
}
int xx(char c)
{if ((c>='a')&&(c<='z')) return 7;
 else return 0;
}
int xhx(char c)
{if (c=='_') return 7;
 else return 0;
}
int num(char c)
{if ((c>='0')&&(c<='9')) return 7;
 else return 0;
}
int head(char c)
{return dx(c)+xx(c)+xhx(c);}
int body(char c)
{return dx(c)+xx(c)+xhx(c)+num(c);}
int main()
{int i,j,k,l,flag=7;
 char c[1000]={' '};
 scanf("%d\n",&k);
 for (j=0;j<k;j++)
 {	scanf("%s",c);
	if (head(c[0])==0) printf("no");
	 else {for (i=strlen(c)-1;i>0;i--)
			    if (body(c[i])==0) flag=0;
		   if (flag==7) printf("yes");
		   if (flag==0) printf("no");
		   flag=7;
		   }
	 putchar(10);
 }
 return 7;
}
int main(){
    int n,i,p,s,flag;
    char zfc[21];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%s",zfc);
        s=strlen(zfc);
        if((zfc[0]>='A'&&zfc[0]<='Z')||(zfc[0]>='a'&&zfc[0]<='z')||zfc[0]=='_'){
            for(p=1;p<s;p++){if((zfc[p]>='A'&&zfc[p]<='Z')||(zfc[p]>='a'&&zfc[p]<='z')||zfc[p]=='_'||(zfc[p]>='0'&&zfc[p]<='9')){flag=1;}
            else {flag=0;break;}}      
    }else{flag=0;}
    if(flag==1){printf("yes\n");}else{printf("no\n");}}
    return 0;
}
int main(){
	int a,i,n,c,d,e;
	char b[100];
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%s",&b);
		d=strlen(b);
		if((b[0]<=90&&b[0]>=65)||b[0]==95||(b[0]>=97&&b[0]<=122))
			e=1;
		else{
			e=0;
			
		}
		for(n=0;n<d;n++){
			if(b[n]<=90&&b[n]>=65)	c=1;
			else if(b[n]==95) c=1;
			else if(b[n]>=97&&b[n]<=122)c=1;
			else if(b[n]<=57&&b[n]>=48)c=1;
			else {c=0;break;}
			
			
		}
		if(c==1&&e==1)
			printf("yes\n");
		else
			printf("no\n");
	}
	return 0;
}
void main()
{
	int n,i,l,j,flag=1;
	char a[50];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",a);
		l=strlen(a);
		if(!(a[0]=='_'||(a[0]>='a'&&a[0]<='z')||(a[0]>='A'&&a[0]<='Z')))
			flag=0;
		else
		{
			for(j=1;j<l;j++)
			{
				if(!(a[j]=='_'||(a[j]>='a'&&a[j]<='z')||(a[j]>='A'&&a[j]<='Z')||(a[j]>='0'&&a[j]<='9')))
				{
					flag=0;break;
				}
				else
					flag=1;
			}
		}
		if(flag==1) printf("yes\n");
		else printf("no\n");
	}
}
int main()
{
	int f=0,b=0,n;                
	char a[81],*p;

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

	while(n>0)
	{
		gets(a);
		p=a;
		if( (*p=='_') || (*p>='a'&&*p<='z') || (*p>='A'&&*p<='Z') )
			b=1;
		else
			b=0;

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

			p++;
		}

		if(f==1&&b==1)
			printf("yes\n");
		else
			printf("no\n");
		n--;
	}
 return 0;
}
void main()
{
    int panduan(char s[],int l);
    int n,i,l;
    char s[21];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
    	scanf("%s",s);
    	l=strlen(s);
    	if(panduan(s,l)>0)
    	printf("yes\n");
    	else
    	printf("no\n");
    }
}
int panduan(char s[],int l)
{
	int j;
	if((s[0]<'A')||(s[0]>'Z'&&s[0]<'_')||(s[0]>'_'&&s[0]<'a')||(s[0]>'z'))
	return(0);
	else
	{
	for(j=1;j<l;j++)
	
	if((s[j]<'0')||(s[j]>'9'&&s[j]<'A')||(s[j]>'Z'&&s[j]<'_')||(s[j]>'_'&&s[j]<'a')||(s[j]>'z'))
	{return(0);break;}
	return(1);
	
	}
}
int main()
{
	int n,i;
	char a[100];
	int m=1;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%s",a);
		int j=1;
		if((a[0]>=65&&a[0]<=90)||(a[0]>=97&&a[0]<=122)||a[0]==95)
		{
			m=1;
			while(a[j]!='\0')
			{
				if(a[j]<48||(a[j]>57&&a[j]<65)||(a[j]>90&&a[j]<95)||a[j]==96||a[j]>122)
				{
					m=0;
				}
				j++;
			}
			if(m==1)
				printf("yes\n");
			if(m==0)
				printf("no\n");
		}
		else
			printf("no\n");
	}
	return 0;
}
int main(){
	char sz[MAX+1];
	int i,j,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",sz);
		for(j=0;sz[j];j++){
			if(!((sz[j]=='_')||(sz[j]>='a'&&sz[j]<='z')||(sz[j]>='A'&&sz[j]<='Z')||(sz[j]>='0'&&sz[j]<='9'&&j!=0))){
				break;
			}
		}    if(i==0){
		if(sz[j]){
			printf("no");
		}else{
			printf("yes");
		}
	}
    else{
    if(sz[j]){
    		printf("\nno");
		}else{
			printf("\nyes");
		}
	}}
	return 0;
}