#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
vector<int> edg[MAXN];
int sz[MAXN];
bool del[MAXN];
void CalcSize(int u, int fa) {
  sz[u] = 1;
  for (__typeof(edg[u].begin()) it = edg[u].begin(); it != edg[u].end(); it++) {
    if (*it == fa || del[*it]) continue;
    CalcSize(*it, u);
    sz[u] += sz[*it];
  }
}
int FindCenter(int u, int fa, int totSize) {
  int maxSize = totSize - sz[u];
  for (__typeof(edg[u].begin()) it = edg[u].begin(); it != edg[u].end(); it++) {
    if (*it == fa || del[*it]) continue;
    maxSize = max(maxSize, sz[*it]);
  }
  if (maxSize * 2 <= totSize) return u;
  for (__typeof(edg[u].begin()) it = edg[u].begin(); it != edg[u].end(); it++) {
    if (*it == fa || del[*it]) continue;
    int x = FindCenter(*it, u, totSize);
    if (x != -1) return x;
  }
  return -1;
}
int GetCenter(int u) {
  CalcSize(u, -1);
  return FindCenter(u, -1, sz[u]);
}
int ans[MAXN];
void Solve(int u, int rank) {
  u = GetCenter(u);
  ans[u] = rank;
  del[u] = true;
  for (__typeof(edg[u].begin()) it = edg[u].begin(); it != edg[u].end(); it++) {
    if (del[*it]) continue;
    Solve(*it, rank + 1);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n - 1); i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    edg[u].push_back(v);
    edg[v].push_back(u);
  }
  Solve(1, 0);
  for (int i = 1; i <= n; ++i) {
    printf("%c%c", ans[i] + 'A', i == n ? '\n' : ' ');
  }
  return 0;
}
