func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2 * 1000 * 100 + 10;   int to[N], nxt[N], idx[N], tot;   int rnk[N], sz[N];   bool visited[N];   int minsz, center;   void add_edge(int u, int v) {     ++tot;     to[tot] = v;     nxt[tot] = idx[u];     idx[u] = tot;   }   int compute_size(int node, int parent) {     int s = 1;     for (int i = idx[node]; i != 0; i = nxt[i]) {       if (!visited[to[i]] && parent != to[i]) {         s += compute_size(to[i], node);       }     }     return sz[node] = s;   }   void compute_center(int node, int parent, int totsz) {     int upsz = totsz - sz[node];     int dnsz = -1;     for (int i = idx[node]; i != 0; i = nxt[i]) {       if (!visited[to[i]] && parent != to[i]) {         compute_center(to[i], node, totsz);         dnsz = max(dnsz, sz[to[i]]);       }     }     if (max(upsz, dnsz) < minsz) {       minsz = max(upsz, dnsz);       center = node;     }   }   void dfs(int node, int depth) {     int totsz = compute_size(node, 0);     minsz = INT_MAX;     compute_center(node, 0, totsz);     int c = center;     rnk[c] = depth;     visited[c] = true;     for (int i = idx[c]; i != 0; i = nxt[i]) {       if (!visited[to[i]]) {         dfs(to[i], depth + 1);       }     }   }   int main() {     ios_base::sync_with_stdio(false);     tot = 0;     memset(nxt, 0, sizeof(nxt));     memset(idx, 0, sizeof(idx));     memset(visited, false, sizeof(visited));     int n;     cin >> n;     for (int i = 0; i < n - 1; i++) {       int u, v;       cin >> u >> v;       add_edge(u, v);       add_edge(v, u);     }     dfs(1, 0);     for (int i = 1; i <= n; i++) {       cout << static_cast<char>(rnk[i] +  A ) <<    ;     }     cout << endl;     return 0;   }   