func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const long long int LINF = 0x3f3f3f3f3f3f3f3fll;   int g;   bool endswith(string a, string b) {     if ((int)((a).size()) < (int)((b).size())) return 0;     for (int i = 0; i < (int)((b).size()); i++)       if (a[(int)((a).size()) - 1 - i] != b[(int)((b).size()) - 1 - i]) return 0;     return 1;   }   bool is_adj(string second) {     if (endswith(second,  lios ))       g = 1;     else if (endswith(second,  liala ))       g = 2;     else       return 0;     return 1;   }   bool is_noun(string second) {     if (endswith(second,  etr ))       g = 1;     else if (endswith(second,  etra ))       g = 2;     else       return 0;     return 1;   }   bool is_verb(string second) {     if (endswith(second,  initis ))       g = 1;     else if (endswith(second,  inites ))       g = 2;     else       return 0;     return 1;   }   int main() {     ios::sync_with_stdio(false);     vector<string> v;     string second;     while (cin >> second) v.push_back(second);     if ((int)((v).size()) == 1) {       if (is_adj(v[0]) or is_noun(v[0]) or is_verb(v[0]))         cout <<  YES  << endl;       else         cout <<  NO  << endl;       return 0;     }     int last = -1;     int n = 0;     bool masc, deu = 1;     for (int i = 0; i < (int)((v).size()); i++) {       if (is_adj(v[i])) {         if (last > 0) deu = 0;         last = 0;       } else if (is_noun(v[i])) {         if (last > 1) deu = 0;         n++;         last = 1;       } else if (is_verb(v[i])) {         last = 2;       } else         deu = 0;       if (!i)         masc = (g == 1);       else if (masc and g == 2)         deu = 0;       else if (!masc and g == 1)         deu = 0;     }     if (n != 1) deu = 0;     int cu;     cout << (deu ?  YES  :  NO ) << endl;     return 0;   }   