#include <bits/stdc++.h>
using namespace std;
int getInt() {
  int n;
  cin >> n;
  return n;
}
int n = getInt();
vector<vector<int> > g(n);
vector<char> ans(n, 0);
vector<int> st(n);
void build(int v, int p, int sz, char rank, int d) {
  if (ans[v]) return;
  if (sz == 1) {
    ans[v] = rank;
    return;
  }
  st[v] = 1;
  int maxVal = -1;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    build(to, v, sz, rank, d + 1);
    if (ans[v]) return;
    if (ans[to]) continue;
    st[v] += st[to];
    maxVal = max(maxVal, st[to]);
  }
  if (p != -1) maxVal = max(maxVal, sz - st[v]);
  if (maxVal * 2 <= sz) {
    ans[v] = rank;
    for (int i = 0; i < g[v].size(); i++) {
      int to = g[v][i];
      if (to == p) continue;
      build(to, -1, st[to], rank + 1, d + 1);
    }
    if (p != -1) build(p, -1, sz - st[v], rank + 1, d + 1);
  }
}
int main() {
  for (int i = 1; i < n; i++) {
    int a = getInt() - 1, b = getInt() - 1;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  build(0, -1, n, 'A', 0);
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  cout << endl;
}
