#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int n;
vector<vector<int> > g;
char res[N];
bool out[N];
int sz[N];
vector<int> visNodes;
void DFS(int u, int p) {
  visNodes.push_back(u);
  sz[u] = 1;
  for (int i = 0; i < g[u].size(); ++i)
    if (g[u][i] != p && !out[g[u][i]]) {
      DFS(g[u][i], u);
      sz[u] += sz[g[u][i]];
    }
}
int findCenter(int u) {
  visNodes.clear();
  DFS(u, -1);
  for (int i = 0; i < visNodes.size(); ++i) {
    int v = visNodes[i];
    int mx = sz[u] - sz[v];
    for (int j = 0; j < g[v].size(); ++j)
      if (!out[g[v][j]] && sz[g[v][j]] < sz[v]) mx = max(mx, sz[g[v][j]]);
    if (mx <= (sz[u] + 1) / 2) return v;
  }
  return -1;
}
void calc(int u, char c) {
  u = findCenter(u);
  out[u] = true;
  res[u] = c;
  for (int i = 0; i < g[u].size(); ++i)
    if (!out[g[u][i]]) calc(g[u][i], c + 1);
}
int main() {
  scanf("%d", &n);
  g.resize(n);
  for (int a, b, i = 1; i < n; ++i) {
    scanf("%d%d", &a, &b);
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  calc(0, 'A');
  for (int i = 0; i < n; ++i) printf("%c%s", res[i], i + 1 == n ? "\n" : " ");
  return 0;
}
