#include <bits/stdc++.h>
const int MN = 1e5 + 500;
using namespace std;
unordered_set<int> v[MN];
int siz[MN][100];
bool used[MN];
int f3(int x, int rank, int up, int yht, int& ans) {
  used[x] = 1;
  int sum = 0;
  int ma = 0;
  for (auto y : v[x]) {
    if (!used[y]) {
      sum += siz[y][rank];
      ma = max(ma, siz[y][rank]);
    }
  }
  if (up * 2 <= yht && ma * 2 <= yht) {
    ans = x;
    used[x] = 0;
    return 1;
  }
  for (auto y : v[x]) {
    if (!used[y]) {
      int nup = up + 1 + sum - siz[y][rank];
      if (f3(y, rank, nup, yht, ans)) {
        used[x] = 0;
        return 1;
      }
    }
  }
  used[x] = 0;
  return 0;
}
int f2(int x, int rank) {
  used[x] = 1;
  siz[x][rank] = 1;
  for (auto y : v[x]) {
    if (!used[y]) {
      siz[x][rank] += f2(y, rank);
    }
  }
  used[x] = 0;
  return siz[x][rank];
}
int ans[MN];
void f(int x, int rank) {
  ans[x] = rank;
  vector<int> lol;
  for (auto y : v[x]) {
    v[y].erase(x);
    f2(y, rank);
    int mid = 0;
    f3(y, rank, 0, siz[y][rank], mid);
    lol.push_back(mid);
  }
  for (auto y : lol) {
    f(y, rank + 1);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; ++i) {
    int q, w;
    cin >> q >> w;
    --q, --w;
    v[q].insert(w);
    v[w].insert(q);
  }
  f(0, 0);
  for (int i = 0; i < n; ++i) {
    cout << (char)('A' + ans[i]) << ' ';
  }
  cout << '\n';
}
