#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> G[N];
int n;
struct Entry {
  int u, pa, label;
  Entry() {}
  Entry(int _u, int _pa, int _label) {
    u = _u;
    pa = _pa;
    label = _label;
  }
};
int treeSz[N];
int labels[N];
int getTreeSz(int u, int pa) {
  int res = 1;
  for (int v : G[u]) {
    if (v == pa || labels[v] != -1) continue;
    res += getTreeSz(v, u);
  }
  return treeSz[u] = res;
}
int put(int u, int pa, int label, int allSz) {
  for (int v : G[u]) {
    if (v == pa || labels[v] != -1) continue;
    if (treeSz[v] > allSz / 2) {
      return put(v, u, label, allSz);
    }
  }
  labels[u] = label;
  return u;
}
int main() {
  scanf("%d", &n);
  memset(labels, -1, sizeof(labels));
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  queue<Entry> q;
  q.push(Entry(1, -1, 0));
  while (!q.empty()) {
    Entry front = q.front();
    q.pop();
    getTreeSz(front.u, front.pa);
    int center = put(front.u, front.pa, front.label, treeSz[front.u]);
    for (int v : G[center]) {
      if (labels[v] != -1) continue;
      q.push(Entry(v, center, front.label + 1));
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%c ", (char)(labels[i] + 'A'));
  }
  printf("\n");
  return 0;
}
