func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, u, v, N;   vector<char> ans(1e5 + 5);   vector<int> sub(1e5 + 5);   vector<set<int> > adj(1e5 + 5);   void dfs(int u, int par) {     sub[u] = 1;     for (int v : adj[u]) {       if (v != par) {         dfs(v, u);         sub[u] += sub[v];       }     }   }   int centroid(int u, int par) {     for (int v : adj[u]) {       if (v != par && sub[v] > n / 2) {         return centroid(v, u);       }     }     return u;   }   void build(int u, int prev, int level) {     dfs(u, -1);     n = sub[u];     int cur = centroid(u, -1);     ans[cur] = char(level + 65);     for (int v : adj[cur]) {       adj[v].erase(cur);       build(v, cur, level + 1);     }   }   int main(void) {     ios ::sync_with_stdio(0);     cin.tie(0);     cin >> n;     N = n;     for (int i = 1; i <= n - 1; ++i) {       cin >> u >> v;       adj[u].insert(v);       adj[v].insert(u);     }     build(1, -1, 0);     for (int i = 1; i <= N; ++i) {       cout << ans[i] <<    ;     }     cout <<   n ;     return 0;   }   