#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; string s; bool flag = false; while (n >= 0) { flag = true; getline(cin, s); if (s.empty()) { flag = false; } else { if (!(s[0] == '_' || isalpha(s[0]))) { flag = false; } else { for (auto &c : s) { if (c != '_' && !isalnum(c)) { flag = false; break; } } } if (flag) { cout << "yes" << endl; } else { cout << "no" << endl; } } n--; } return 0; }