#include <bits/stdc++.h>
using namespace std;
const int maxN = (int)1E5 + 5;
int n;
vector<int> Adj[maxN], curTree[maxN], nextLev[maxN];
int deg[maxN], visit_T[maxN], szSub[maxN];
int cur_T;
void DFS(int u, int start_T) {
  szSub[u] = 1;
  curTree[u].clear();
  visit_T[u] = ++cur_T;
  for (int i = 0, sz = Adj[u].size(); i < sz; ++i)
    if (deg[Adj[u][i]] == 0 && visit_T[Adj[u][i]] <= start_T) {
      DFS(Adj[u][i], start_T);
      szSub[u] += szSub[Adj[u][i]];
      curTree[u].push_back(Adj[u][i]);
    }
}
int getCentroid(int u, int curN) {
  for (int i = 0, sz = curTree[u].size(); i < sz; ++i)
    if (szSub[curTree[u][i]] > curN / 2)
      return getCentroid(curTree[u][i], curN);
  nextLev[u].clear();
  for (int i = 0, sz = Adj[u].size(); i < sz; ++i)
    if (deg[Adj[u][i]] == 0) nextLev[u].push_back(Adj[u][i]);
  return u;
}
void decomposeTree(int u, int curDeg) {
  DFS(u, cur_T);
  int r = getCentroid(u, szSub[u]);
  deg[r] = curDeg;
  for (int i = 0, sz = nextLev[r].size(); i < sz; ++i)
    decomposeTree(nextLev[r][i], curDeg + 1);
}
int main() {
  scanf("%d", &n);
  for (int u = 1; u <= n; ++u) Adj[u].clear();
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    Adj[u].push_back(v);
    Adj[v].push_back(u);
  }
  cur_T = 0;
  memset(visit_T, 255, sizeof(visit_T));
  memset(deg, 0, sizeof(deg));
  decomposeTree(1, 1);
  for (int u = 1; u <= n; ++u) printf("%c ", 'A' + (deg[u] - 1));
  puts("");
  return 0;
}
