func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> v[600];   char s[600];   int cnt = 0;   int rec[3];   void dfs(int src, char c) {     s[src] = c;     for (int i = 0; i < v[src].size(); i++)       if (s[v[src][i]] !=  b ) {         cnt++;         s[v[src][i]] = c;       }   }   int main() {     int n, m;     cin >> n >> m;     for (int i = 0; i < m; i++) {       int a, b;       cin >> a >> b;       v[a].push_back(b);       v[b].push_back(a);     }     for (int i = 1; i <= n; i++)       if (v[i].size() == n - 1) {         cnt++;         s[i] =  b ;       }     rec[1] = cnt;     for (int i = 1; i <= n; i++)       if (s[i] !=  b ) {         cnt++;         dfs(i,  a );         break;       }     rec[0] = cnt - rec[1];     for (int i = 1; i <= n; i++)       if (s[i] !=  a  && s[i] !=  b ) {         cnt++;         dfs(i,  c );         break;       }     rec[2] = cnt - rec[0] - rec[1];     int x = rec[0] * (rec[0] + rec[1] - 1) + rec[1] * (n - 1) +             rec[2] * (rec[1] + rec[2] - 1);     if (cnt != n || x / 2 != m)       cout <<  No  << endl;     else {       cout <<  Yes  << endl;       for (int i = 1; i <= n; i++) cout << s[i];       cout << endl;     }     return 0;   }   