#include <bits/stdc++.h>
using namespace std;
int const MAX = 100100;
int n;
vector<int> tree[MAX];
int subsize[MAX];
char ranks[MAX];
void DFS(int v, int pre) {
  subsize[v] = 1;
  for (int e : tree[v]) {
    if (e != pre && !ranks[e]) {
      DFS(e, v);
      subsize[v] += subsize[e];
    }
  }
}
int getCentroid(int v, int pre, int size) {
  for (int e : tree[v]) {
    if (!ranks[e] && e != pre && subsize[e] * 2 > size) {
      return getCentroid(e, v, size);
    }
  }
  return v;
}
void decomposeTree(int v, char r, int size) {
  DFS(v, -1);
  v = getCentroid(v, -1, size);
  ranks[v] = r;
  DFS(v, -1);
  for (int e : tree[v]) {
    if (!ranks[e]) {
      decomposeTree(e, r + 1, subsize[e]);
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    --u, --v;
    tree[v].push_back(u);
    tree[u].push_back(v);
  }
  decomposeTree(0, 'A', n);
  for (int i = 0; i < n; i++) {
    cout << ranks[i] << ' ';
  }
}
