#include <bits/stdc++.h>
using namespace std;
int const maxN = 1e5 + 20;
int n, s[maxN], size[30][maxN], vis[maxN];
vector<int> adj[maxN], child[maxN];
void makeChild(int ver, int t) {
  if (child[ver].size()) child[ver].clear();
  vis[ver]++;
  for (int i = (int)(0); i < (int)(adj[ver].size()); i++) {
    if (vis[adj[ver][i]] <= t && s[adj[ver][i]] == -1) {
      child[ver].push_back(adj[ver][i]);
      makeChild(adj[ver][i], t);
    }
  }
  return;
}
int findSize(int ver, int t) {
  if (size[t][ver]) return size[t][ver];
  int res = 1;
  for (int i = (int)(0); i < (int)(child[ver].size()); i++) {
    res += findSize(child[ver][i], t);
  }
  return (size[t][ver] = res);
}
int find(int ver, int n2, int t) {
  bool f = 0;
  for (int i = (int)(0); i < (int)(child[ver].size()); i++)
    if (findSize(child[ver][i], t) > (n2 / 2))
      return find(child[ver][i], n2, t);
  return ver;
}
void solve(int ver, int t, int n2) {
  makeChild(ver, t);
  int a = find(ver, n2, t);
  s[a] = t;
  for (int i = (int)(0); i < (int)(adj[a].size()); i++)
    if (s[adj[a][i]] == -1) solve(adj[a][i], t + 1, n2 / 2);
  return;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)(0); i < (int)(n - 1); i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    adj[a - 1].push_back(b - 1);
    adj[b - 1].push_back(a - 1);
  }
  for (int i = (int)(0); i < (int)(n); i++) s[i] = -1;
  solve(0, 0, n);
  for (int i = (int)(0); i < (int)(n); i++) printf("%c ", 'A' + s[i]);
  return 0;
}
