#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int N = 1e5 + 7;
const int M = 5e2 + 7;
int n, l, r;
vector<vector<int> > vec(N);
int d[N], sub[N];
char ra[N];
struct build {
  inline void dfs(int v, int par) {
    sub[v] = 1;
    for (int i : vec[v]) {
      if (d[i] || par == i) {
        continue;
      }
      dfs(i, v);
      sub[v] += sub[i];
    }
  }
  inline int centroid(int v, int par, int sz) {
    for (int i : vec[v]) {
      if (d[i] || par == i) {
        continue;
      }
      if (sub[i] > sz / 2) {
        return centroid(i, v, sz);
      }
    }
    return v;
  }
  inline void getrank(int v, int r) {
    dfs(v, v);
    int vr = centroid(v, v, sub[v]);
    ra[vr] = char(r + 'A');
    d[vr] = 1;
    for (int i : vec[vr]) {
      if (d[i]) {
        continue;
      }
      getrank(i, r + 1);
    }
  }
} ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    scanf("%d", &l);
    scanf("%d", &r);
    vec[l].push_back(r);
    ;
    vec[r].push_back(l);
    ;
  }
  ans.getrank(1, 0);
  for (int i = 1; i <= n; ++i) {
    printf("%c ", ra[i]);
  }
}
