2851 {
2852 int n;
2853 cin >> n;
2854 char str[1024];
2855 cin.getline(str, 1024);
2856 while(n-- != 0) {
2857 cin.getline(str, 1024);
2858 auto password = string(str);
2859 bool alpha = false;
2860 bool digit = false;
2861 bool ok = true;
2862 if(password.length() < 6) {
2863 cout << "Your password is tai duan le." << endl;
2864 } else {
2865 for(const char ch: password) {
2866 if(isdigit(ch) != 0) {
2867 digit = true;
2868 } else if(isalpha(ch) != 0) {
2869 alpha = true;
2870 } else if(ch != '.') {
2871 ok = false;
2872 cout << "Your password is tai luan le." << endl;
2873 break;
2874 }
2875 }
2876 if(!ok) {
2877 continue;
2878 }
2879 if(alpha && !digit) {
2880 cout << "Your password needs shu zi." << endl;
2881 } else if(!alpha && digit) {
2882 cout << "Your password needs zi mu." << endl;
2883 } else if(alpha && digit) {
2884 cout << "Your password is wan mei." << endl;
2885 } else {
2886 return 1;
2887 }
2888 }
2889 }
2890 return 0;
2891 }