#include <bits/stdc++.h>
using namespace std;
const int MX = 100009;
const long long INF = (1ll << 60);
const int inf = (1 << 30);
const long long mod = 1e9 + 7;
int n, a, b, subtree[MX], par[MX], blocked[MX];
char ans[MX];
vector<int> v[MX];
void dfs(int x, int p) {
  subtree[x] = 1;
  par[x] = p;
  for (auto pp : v[x]) {
    if (pp == p || blocked[pp]) continue;
    dfs(pp, x);
    subtree[x] += subtree[pp];
  }
}
void create(int x, char c) {
  int second = subtree[x], idx;
  queue<int> q;
  q.push(x);
  dfs(x, -1);
  while (!q.empty()) {
    int nxt = q.front();
    q.pop();
    int s = subtree[x] - subtree[nxt];
    for (auto pp : v[nxt]) {
      if (pp == par[nxt] || blocked[pp]) continue;
      s = max(s, subtree[pp]);
      q.push(pp);
    }
    if (second > s) {
      second = s;
      idx = nxt;
    }
  }
  blocked[idx] = 1;
  ans[idx] = c;
  for (auto pp : v[idx]) {
    if (blocked[pp]) continue;
    create(pp, c + 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1, -1);
  create(1, 'A');
  for (int i = 1; i <= n; i++) printf("%c ", ans[i]);
}
