#include <bits/stdc++.h>
using namespace std;
void solve(int nod, char col);
int centroid(int nod);
void calc_dist(int nod, int tata);
int get_h_max(int nod, int tata);
int get_h_spec(int nod, int tata, int val);
int h[100010];
int prov[100010];
int culori;
char rez[100010];
bool culoare[100010];
vector<int> adia[100010];
int main() {
  h[0] = -1;
  ios_base::sync_with_stdio(0);
  int n, a, b;
  cin >> n;
  for (int i(1); i < n; i++) {
    cin >> a >> b;
    adia[a].push_back(b);
    adia[b].push_back(a);
  }
  for (int i(1); i <= n; i++) culoare[i] = 1;
  solve(1, 'A');
  for (int i(1); i <= n; i++) cout << rez[i] << ' ';
  return 0;
}
int centroid(int nod) {
  calc_dist(nod, 0);
  int n(get_h_max(nod, 0));
  calc_dist(n, 0);
  n = get_h_max(n, 0);
  int d(h[n] / 2);
  return get_h_spec(nod, 0, d);
}
int get_h_spec(int nod, int tata, int val) {
  if (h[nod] == val) return nod;
  int r(-1);
  for (auto i : adia[nod]) {
    if (i != tata && culoare[i]) r = max(r, get_h_spec(i, nod, val));
  }
  return r;
}
int get_h_max(int nod, int tata) {
  int r(nod);
  for (auto i : adia[nod]) {
    if (i != tata && culoare[i]) {
      int x(get_h_max(i, nod));
      if (h[x] > h[r]) r = x;
    }
  }
  return r;
}
void calc_dist(int nod, int tata) {
  h[nod] = h[tata] + 1;
  prov[nod] = tata;
  for (auto i : adia[nod]) {
    if (i != tata && culoare[i]) calc_dist(i, nod);
  }
}
void solve(int nod, char col) {
  nod = centroid(nod);
  culoare[nod] = 0;
  rez[nod] = col;
  for (auto i : adia[nod]) {
    if (culoare[i]) solve(i, col + 1);
  }
}
