#include <bits/stdc++.h>
using namespace std;
const int N = 100002;
vector<int> g[N];
bool vis[N];
int a[N];
int n, m, ans, id;
void dfs3(int u, int fa) {
  ++m;
  for (int v : g[u]) {
    if (v == fa || vis[v]) continue;
    dfs3(v, u);
  }
}
int dfs2(int u, int fa) {
  int mx = 0, sz = 1;
  for (int v : g[u]) {
    if (v == fa || vis[v]) continue;
    int w = dfs2(v, u);
    mx = max(mx, w);
    sz += w;
  }
  mx = max(mx, m - sz);
  if (mx < ans) ans = mx, id = u;
  return sz;
}
void dfs1(int u, int idx) {
  ans = 0x3f3f3f3f;
  m = 0;
  dfs3(u, 0);
  dfs2(u, 0);
  u = id;
  vis[u] = 1;
  a[u] = idx;
  for (int v : g[u]) {
    if (vis[v]) continue;
    dfs1(v, idx + 1);
  }
}
int main() {
  int x, y;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs1(1, 0);
  for (int i = 1; i <= n; i++) printf("%c%c", 'A' + a[i], " \n"[i == n]);
}
