#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > V[100000 + 5];
int ES[100000 + 5], alt[100000 + 5];
int x, y, N;
bool edge[3 * 100000 + 5];
char res[100000 + 5];
int bul(int x, int last, int M) {
  int sum = 1, ret;
  for (int i = 0; i <= ES[x] - 1; i++)
    if (V[x][i].first != last && edge[V[x][i].second]) {
      ret = bul(V[x][i].first, x, M);
      sum += ret;
      if (ret < 0) return ret;
    }
  if (M - sum <= M / 2 + (M & 1)) return -x;
  return sum;
}
int say(int x, int last) {
  int ret = 1;
  for (int i = 0; i <= ES[x] - 1; i++)
    if (V[x][i].first != last && edge[V[x][i].second])
      ret += say(V[x][i].first, x);
  return ret;
}
void coz(int nod, char harf) {
  int M = say(nod, 0);
  if (M == 1) {
    res[nod] = harf;
    return;
  }
  int orta = -(bul(nod, 0, M));
  res[orta] = harf;
  for (int i = 0; i <= ES[orta] - 1; i++)
    if (edge[V[orta][i].second]) {
      edge[V[orta][i].second] = false;
      coz(V[orta][i].first, harf + 1);
      edge[V[orta][i].second] = true;
    }
}
int main() {
  cin >> N;
  for (int i = 1; i <= N - 1; i++) {
    scanf("%d %d", &x, &y);
    V[x].push_back(pair<int, int>(y, i));
    V[y].push_back(pair<int, int>(x, i));
    edge[i] = true;
  }
  for (int i = 1; i <= N; i++) ES[i] = V[i].size();
  coz(1, 'A');
  printf("%c", res[1]);
  for (int i = 2; i <= N; i++) printf(" %c", res[i]);
  printf("\n");
}
