func_code_string: #include <bits/stdc++.h>   using namespace std;   int col[501];   int tcol[501];   int edge[501][501];   void docol(int v, int c) {     col[v] = c;     for (int i = 1; i <= v; ++i) {       if (edge[v][i] && col[i] == -1) {         docol(i, c);       }     }   }   int main(void) {     ios_base::sync_with_stdio(false);     int n;     cin >> n;     int k;     cin >> k;     memset(tcol, -1, sizeof(tcol));     memset(col, -1, sizeof(col));     memset(edge, 0, sizeof(edge));     for (int i = 1; i <= k; ++i) {       int a, b;       cin >> a >> b;       edge[a][b] = 1;       edge[b][a] = 1;     }     int b = 0;     for (int i = 1; i <= n; ++i) {       bool flag = true;       for (int j = 1; j <= n; ++j) {         if (i == j) continue;         if (edge[i][j] == 0) {           flag = false;           break;         }       }       if (flag) {         tcol[i] = 1;         b++;       }     }     if (b == n) {       cout <<  Yes n ;       for (int i = 1; i <= n; ++i) cout <<  b ;       return 0;     }     for (int i = 1; i <= n; ++i) {       if (tcol[i] != -1) continue;       memset(col, -1, sizeof(col));       for (int j = 1; j <= n; ++j) col[j] = tcol[j];       docol(i, 0);       for (int j = 1; j <= n; ++j) {         if (col[j] == -1) col[j] = 2;       }       bool flag = false;       for (int ii = 1; ii <= n && !flag; ++ii) {         for (int j = 1; j <= n && !flag; ++j) {           if (ii == j) continue;           if (edge[ii][j] == 0) {             if ((col[ii] == 0 && col[j] == 2) || (col[ii] == 2 && col[j] == 0))               continue;             else {               flag = true;               break;             }           }           if (col[ii] == 1 || col[j] == 1) continue;           if (col[ii] == 0 && (col[j] == 0 || col[j] == 1)) continue;           if (col[ii] == 2 && (col[j] == 2 || col[j] == 1)) continue;           flag = true;           break;         }       }       if (flag) continue;       cout <<  Yes n ;       for (int ii = 1; ii <= n; ++ii)         cout << (col[ii] == 0 ?  a  : col[ii] == 1 ?  b  :  c );       return 0;     }     cout <<  No ;     return 0;   }   