#include<stdio.h>
#include<string.h>
int main(){
int n,i,j,t,c,k,f;
char str[250]="";
scanf("%d",&n);
getchar();
for(i=0;i<n;i++){
gets(str);
t=strlen(str);
if(t<6) {
printf("Your password is tai duan le.\n");
continue;
}
else{
c=0,k=0,f=0;
for(i=0;i<t;i++){
if(str[i]>='0'&&str[i]<='9') {
c=1;
}else if(str[i]>='A'&&str[i]<='Z'||str[i]>='a'&&str[i]<='z'){
k=1;
}else if(str[i]=='.') {
f=1;
}
}
if(f==0) printf("Your password is tai luan le.\n");
else if(c==0) printf("Your password needs zi mu.\n");
else if(k==0) printf("Your password needs shu zi.\n");
else if(c==1&&k==1) printf("Your password is wan mei.\n");
}
}
return 0;
}