func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, k;   vector<int> g[100005];   int siz[100005];   bool era[100005];   long long rans;   int col[100005];   int calc(int v, int p) {     int cnt = 1;     for (int i = 0; i < (int)g[v].size(); i++) {       int to = g[v][i];       if (to == p || era[to]) continue;       cnt += calc(to, v);     }     siz[v] = cnt;     return cnt;   }   pair<int, int> fnd(int v, int p, int t) {     pair<int, int> res = make_pair(1e9, -1);     int cnt = 1, mx = 0;     for (int i = 0; i < (int)g[v].size(); i++) {       int to = g[v][i];       if (to == p || era[to]) continue;       res = min(res, fnd(to, v, t));       cnt += siz[to];       mx = max(mx, siz[to]);     }     mx = max(mx, t - cnt);     res = min(res, make_pair(mx, v));     return res;   }   void solve(int v, int lev) {     calc(v, -1);     int s = fnd(v, -1, siz[v]).second;     era[s] = 1;     col[s] = lev;     for (int i = 0; i < (int)g[s].size(); i++) {       if (era[g[s][i]]) continue;       solve(g[s][i], lev + 1);     }     era[s] = 0;   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n - 1; i++) {       int a, b;       scanf( %d %d , &a, &b);       g[a].push_back(b);       g[b].push_back(a);     }     solve(1, 1);     for (int i = 1; i <= n; i++)       if (col[i] > 26) {         puts( Impossible! );         return 0;       }     for (int i = 1; i <= n; i++) printf( %c  , col[i] - 1 +  A );     puts(  );     return 0;   }   