#include <bits/stdc++.h>
using namespace std;
int n, szv[100100], letter[100100];
set<int> G[100100];
void dfssize(int v, int p) {
  szv[v] = 1;
  for (typeof(G[v].begin()) it = G[v].begin(); it != G[v].end(); ++it)
    if (*it != p) {
      dfssize(*it, v);
      szv[v] += szv[*it];
    }
}
int centroid(int root) {
  dfssize(root, -1);
  int tam = szv[root];
  int v = root, p = -1;
  bool newv;
  do {
    newv = false;
    for (typeof(G[v].begin()) it = G[v].begin(); it != G[v].end(); ++it)
      if (*it != p && szv[*it] >= tam / 2) {
        p = v;
        v = *it;
        newv = true;
        break;
      }
  } while (newv);
  return v;
}
int main() {
  ios::sync_with_stdio(0);
  while (cin >> n) {
    for (int i = (0); i < (n - 1); i++) {
      int a, b;
      cin >> a >> b;
      a--, b--;
      G[a].insert(b);
      G[b].insert(a);
    }
    vector<pair<int, int> > q;
    q.push_back(pair<int, int>(0, 0));
    while (((int)q.size())) {
      int v = q.back().first;
      int gr = q.back().second;
      q.pop_back();
      if (!((int)G[v].size())) letter[v] = gr;
      int c = centroid(v);
      letter[c] = gr;
      for (typeof(G[c].begin()) it = G[c].begin(); it != G[c].end(); ++it) {
        q.push_back(pair<int, int>(*it, gr + 1));
      }
      for (typeof(G[c].begin()) it = G[c].begin(); it != G[c].end(); ++it)
        G[*it].erase(c);
      G[c].clear();
    }
    for (int i = (0); i < (n); i++)
      cout << char(letter[i] + 'A') << (i != n - 1 ? ' ' : '\n');
    for (int i = (0); i < (n); i++) G[i].clear();
  }
  return 0;
}
