func_code_string: #include <bits/stdc++.h>   using i64 = long long;   int n;   std::vector<std::vector<int>> g;   std::vector<int> sz, d;   int dfs(int v, int p) {     return sz[v] =                std::accumulate(g[v].begin(), g[v].end(), 1, [=](int s, int c) {                  return s + (d[c] >= 0 || c == p ? 0 : dfs(c, v));                });   }   int centroid(int v, int p, int t) {     for (auto c : g[v]) {       if (d[c] >= 0 || c == p) continue;       if (2 * sz[c] > t) return centroid(c, v, t);     }     return v;   }   void rec(int v, int r) {     dfs(v, -1);     int c = centroid(v, -1, sz[v]);     d[c] = r;     for (auto e : g[c]) {       if (d[e] >= 0) continue;       rec(e, r + 1);     }   }   int main() {     scanf( %d , &n);     g.resize(n);     sz.resize(n);     d.resize(n, -1);     for (int i = 1; i < n; i++) {       int u, v;       scanf( %d%d , &u, &v);       --u;       --v;       g[u].push_back(v);       g[v].push_back(u);     }     rec(0, 0);     for (char c : d) printf( %c  ,  A  + c);     printf(  n );     return 0;   }   