#include <bits/stdc++.h>
const int maxn = 100001;
int n, i, j, u, v, top, fir, las, spt[maxn], sl[maxn], vt[maxn], que[maxn],
    val[maxn], st[maxn], sav[maxn], ans[maxn];
bool check[maxn], avail[maxn];
std::vector<int> adj[maxn];
void dfs() {
  top = 1;
  st[1] = que[fir];
  vt[st[1]] = 0;
  sl[st[1]] = 1;
  check[st[1]] = true;
  while (1 == 1) {
    u = st[top];
    while (vt[u] < spt[u] &&
           (avail[adj[u][vt[u]]] || adj[u][vt[u]] == st[top - 1]))
      vt[u]++;
    if (vt[u] < spt[u]) {
      st[++top] = adj[u][vt[u]];
      vt[u]++;
      vt[st[top]] = 0;
      check[st[top]] = true;
      sl[st[top]] = 1;
    } else {
      if (val[fir] - sl[u] <= val[fir] >> 1 && check[u]) return;
      sl[st[--top]] += sl[u];
      if (sl[u] > val[fir] >> 1) check[st[top]] = false;
    }
  }
}
int main() {
  std::cin >> n;
  for (i = 1; i < n; i++) {
    std::cin >> u >> v;
    spt[u]++;
    spt[v]++;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  fir = 1;
  las = 1;
  que[1] = 1;
  val[1] = n;
  sav[1] = 65;
  while (fir <= las) {
    dfs();
    avail[u] = true;
    ans[u] = sav[fir];
    for (i = 0; i < spt[u]; i++)
      if (!avail[adj[u][i]]) {
        que[++las] = adj[u][i];
        if (que[las] == st[top - 1])
          val[las] = val[fir] - sl[u];
        else
          val[las] = sl[que[las]];
        sav[las] = sav[fir] + 1;
      }
    fir++;
  }
  for (i = 1; i <= n; i++) std::cout << char(ans[i]) << " ";
  return 0;
}
