#include <bits/stdc++.h>
using namespace std;
int n, uz[100005], nrNoduri[100005], dad[100005], cul[100005];
vector<int> L[100005], fii[100005];
void descCentroid(int x, int tata);
int DFS(int x, int tata);
int centr(int x, int tata, int size);
void coloreaza(int x);
int main() {
  int x, y;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    L[x].push_back(y);
    L[y].push_back(x);
  }
  descCentroid(1, -1);
  int rad;
  for (int i = 1; i <= n; i++)
    if (dad[i] == i) {
      rad = i;
      break;
    }
  cul[rad] = 1;
  coloreaza(rad);
  for (int i = 1; i <= n; i++) cout << char('A' + cul[i] - 1) << ' ';
  cout << '\n';
  return 0;
}
void coloreaza(int x) {
  for (int i : fii[x]) {
    cul[i] = cul[x] + 1;
    coloreaza(i);
  }
}
void descCentroid(int x, int tata) {
  int size = DFS(x, tata);
  int centroid = centr(x, tata, size);
  if (tata == -1) tata = centroid;
  uz[centroid] = 1;
  dad[centroid] = tata;
  if (tata != centroid) fii[tata].push_back(centroid);
  for (int i : L[centroid]) {
    if (uz[i]) continue;
    descCentroid(i, centroid);
  }
}
int DFS(int x, int tata) {
  nrNoduri[x] = 1;
  for (int i : L[x])
    if (!uz[i] && i != tata) nrNoduri[x] += DFS(i, x);
  return nrNoduri[x];
}
int centr(int x, int tata, int size) {
  for (int i : L[x])
    if (!uz[i] && i != tata && nrNoduri[i] > size / 2) return centr(i, x, size);
  return x;
}
