#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 9;
vector<int> tree[mx];
int subsz[mx];
int centroidMarked[mx];
int level[mx];
void dfs(int cur, int prev) {
  subsz[cur] = 1;
  for (auto i : tree[cur]) {
    if (i != prev && !centroidMarked[i]) {
      dfs(i, cur);
      subsz[cur] += subsz[i];
    }
  }
}
int getcentroid(int cur, int prev, int sz) {
  bool isC = true;
  int hc = -1;
  for (auto i : tree[cur]) {
    if (i != prev && !centroidMarked[i] && subsz[i] > sz) {
      isC = false;
      hc = i;
      break;
    }
  }
  if (isC && subsz[cur] >= sz) return cur;
  return getcentroid(hc, cur, sz);
}
int getcentroid(int src) {
  dfs(src, -1);
  int c = getcentroid(src, -1, subsz[src] / 2);
  centroidMarked[c] = 1;
  return c;
}
void build(int root, int lv) {
  int c = getcentroid(root);
  level[c] = lv;
  for (auto i : tree[c]) {
    if (!centroidMarked[i]) {
      build(i, lv + 1);
    }
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  build(1, 0);
  for (int i = 1; i <= n; i++) printf("%c ", level[i] + 65);
}
