#include <bits/stdc++.h>
using namespace std;
vector<int> e[100010];
int bfs[100010], last[100010], used[100010], tt, v[100010], stop[100010],
    an[100010];
int go(int x) {
  int i, j, k;
  bfs[0] = x;
  tt++;
  used[x] = tt;
  v[x] = 0;
  last[x] = -1;
  for (i = 0, j = 1; i < j; i++) {
    x = bfs[i];
    for (k = 0; k < e[x].size(); k++) {
      int y = e[x][k];
      if (used[y] == tt || stop[y]) continue;
      bfs[j++] = y;
      last[y] = x;
      used[y] = tt;
      v[y] = v[x] + 1;
    }
  }
  return i;
}
int find_mid(int x) {
  int n = go(x), i;
  int st = bfs[n - 1];
  go(st);
  int k = bfs[n - 1];
  for (i = 0; i < v[bfs[n - 1]] / 2; i++) {
    if (last[k] != -1) k = last[k];
  }
  return k;
}
void fill(int x, int u) {
  int i;
  an[x] = u;
  stop[x] = 1;
  for (i = 0; i < e[x].size(); i++) {
    int y = e[x][i];
    if (stop[y]) continue;
    int mid = find_mid(y);
    fill(mid, u + 1);
  }
}
int main() {
  int i, j, k, n;
  scanf("%d", &n);
  for (i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  int mid = find_mid(1);
  stop[mid] = 1;
  fill(mid, 0);
  for (i = 1; i <= n; i++) {
    if (i != 1) printf(" ");
    printf("%c", an[i] + 'A');
  }
  puts("");
  return 0;
}
