#include <bits/stdc++.h>
using namespace std;
vector<int> vv[100005], cvv[100005];
int root;
bool flag[100005];
int total[100005];
int centroid;
char ans[100005];
void dfs(int u, int par, int n) {
  total[u] = 1;
  if (n == 1) {
    centroid = u;
    return;
  }
  for (int i = 0; i < vv[u].size(); i++) {
    int v = vv[u][i];
    if (v == par || flag[v]) continue;
    dfs(v, u, n);
    total[u] += total[v];
  }
  int tt = 0;
  for (int i = 0; i < vv[u].size(); i++) {
    int v = vv[u][i];
    if (v == par || flag[v]) continue;
    if (total[v] * 2 > n) return;
    tt += total[v];
  }
  int z = n - tt - 1;
  if (z * 2 <= n) centroid = u;
}
int Clear(int u, int par) {
  int ret = 1;
  total[u] = 0;
  for (int i = 0; i < vv[u].size(); i++) {
    int v = vv[u][i];
    if (flag[v] || v == par) continue;
    ret += Clear(v, u);
  }
  return ret;
}
void make(int u, int n, int par) {
  n = Clear(u, 0);
  centroid = 0;
  dfs(u, 0, n);
  flag[centroid] = 1;
  if (par) {
    cvv[centroid].push_back(par);
    cvv[par].push_back(centroid);
  } else
    root = centroid;
  int zz = centroid;
  for (int i = 0; i < vv[zz].size(); i++) {
    int v = vv[zz][i];
    if (flag[v]) continue;
    make(v, total[v], zz);
  }
}
void get_ans(int u, int par, char ch) {
  ans[u] = ch;
  for (int i = 0; i < cvv[u].size(); i++) {
    int v = cvv[u][i];
    if (v == par) continue;
    get_ans(v, u, ch + 1);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    vv[u].push_back(v);
    vv[v].push_back(u);
  }
  make(1, n, 0);
  get_ans(root, 0, 'A');
  for (int i = 1; i <= n; i++) printf("%c ", ans[i]);
}
