#include <bits/stdc++.h>
using namespace std;
int n, con[100005], centroid[100005];
int ans[100005];
vector<int> v[100005];
bool b[100005];
void dfs(int id, int cha) {
  con[id] = 1;
  for (int i : v[id]) {
    if (i != cha && !b[i]) {
      dfs(i, id);
      con[id] = con[id] + con[i];
    }
  }
  return;
}
int anotherfindcenbutnotvoid(int u, int cha, int fuckTLD) {
  for (int i : v[u]) {
    if (!b[i] && i != cha && con[i] > fuckTLD / 2)
      return anotherfindcenbutnotvoid(i, u, fuckTLD);
  }
  return u;
}
void findcentroid(int id, int c) {
  dfs(id, id);
  int node;
  node = anotherfindcenbutnotvoid(id, id, con[id]);
  ans[node] = c;
  b[node] = true;
  for (int i : v[node]) {
    if (!b[i]) findcentroid(i, c + 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n - 1; i++) {
    int ai, bi;
    scanf("%d %d", &ai, &bi);
    v[ai].push_back(bi);
    v[bi].push_back(ai);
  }
  findcentroid(1, 65);
  for (int i = 1; i <= n; i++) printf("%c ", (char)ans[i]);
  return 0;
}
