func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = (int)5e5 + 9;   const int maxm = (int)1e6 + 9;   const long long mod = (long long)1e9 + 7;   const double pi = acos(-1);   const double eps = 1e-15;   vector<pair<int, int> > to[maxn];   int fa[maxn];   int tobig[maxn];   int n, m;   int e[maxn];   int e2[maxn];   int f[maxn];   int fe[maxn];   void init() {     scanf( %d%d , &n, &m);     for (int i = 0; i < m; i++) {       int a, b;       cin >> a >> b;       to[a].emplace_back(i, b);       to[b].emplace_back(i, a);       e[i] = a;       e2[i] = b;     }     memset(tobig, -1, sizeof(tobig));   }   int vis[maxn];   void dfs(int u, int ft) {     vis[u] = -1;     for (int i = 0; i < to[u].size(); i++) {       int v = to[u][i].second;       if (ft == v) continue;       fa[u] = i;       if (vis[v] == 0) {         dfs(v, u);       } else if (vis[v] == -1) {         int mn = maxn;         int mx = -1;         int tmp = v;         vector<int> tot;         do {           int d = to[tmp][fa[tmp]].first;           tot.push_back(d);           mn = min(mn, d);           mx = max(mx, d);           tmp = to[tmp][fa[tmp]].second;         } while (tmp != v);         tobig[mn] = mx;         int mxp, mnp;         int len = tot.size();         for (int x = 0; x < len; x++) {           if (mx == tot[x]) mxp = x;           if (mn == tot[x]) mnp = x;         }         int fl = 0;         for (int x = mxp; x != mnp; x = (x + 1) % len) {           if (tot[x] < tot[(x + 1) % len]) {             fl = 1;             break;           }         }         for (int x = mxp; x != mnp; x = (x + len - 1) % len) {           if (tot[x] < tot[(x + len - 1) % len]) {             fl = 1;             break;           }         }         if (fl) {           tobig[mn] = -1;         }       }     }     vis[u] = 1;   }   int bcj[maxn];   int fd(int x) { return bcj[x] = bcj[x] == x ? x : fd(bcj[x]); }   int main() {     init();     dfs(1, -1);     for (int i = 1; i <= n; i++) {       bcj[i] = i;       f[i] = 1;     }     for (int i = m - 1; i >= 0; i--) {       int fu = fd(e[i]);       int fv = fd(e2[i]);       int tt = f[e[i]] + f[e2[i]];       if (fu == fv) {         if (tobig[i] != -1) {           tt -= fe[tobig[i]];         }       } else {         bcj[fu] = fv;       }       fe[i] = f[e[i]] = f[e2[i]] = tt;     }     for (int i = 1; i <= n; i++) {       cout << f[i] - 1 <<    ;     }     cout << endl;   }   