#include<iostream>
#include<cctype>
using namespace std;
int main(){
int n;
string s;
cin>>n;
getchar();
for(int i=0;i<n;i++){
getline(cin,s);
int alp=0,num=0,d=0,oth=0;
for(int j=0;j<s.length();j++){
if(isalpha(s[j]))alp++;
else if(isdigit(s[j]))num++;
else if(s[j]=='.')d++;
else oth++;
}
if(s.length()>=6&&alp!=0&&num!=0&&oth==0)
cout<<"Your password is wan mei."<<endl;
else if(s.length()<6)
cout<<"Your password is tai duan le."<<endl;
else if(oth!=0)
cout<<"Your password is tai luan le."<<endl;
else if(num==0)
cout<<"Your password needs shu zi."<<endl;
else if(alp==0)
cout<<"Your password needs zi mu."<<endl;
}
return 0;
}