#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > adj[100005];
int vis[100005], v;
int n, m;
int del[100005];
int sum[100005];
char ans[100005];
void read() {
  int a, b;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &a, &b);
    adj[a].push_back(make_pair(b, i));
    adj[b].push_back(make_pair(a, i));
  }
  return;
}
int find(int nod) {
  int i, b, p, t, f;
  vis[nod] = v;
  sum[nod] = 1;
  p = -1;
  f = 1;
  for (i = 0; i < adj[nod].size(); i++)
    if (!del[adj[nod][i].second]) {
      b = adj[nod][i].first;
      if (vis[b] == v)
        p = b;
      else {
        t = find(b);
        if (t) return t;
        sum[nod] += sum[b];
        if (sum[b] > (m + 1) / 2) f = 0;
      }
    }
  if (p != -1 && (m - sum[nod]) > (m + 1) / 2) f = 0;
  if (f)
    return nod;
  else
    return 0;
}
void dfs(int nod) {
  int i, b;
  vis[nod] = v;
  m++;
  for (i = 0; i < adj[nod].size(); i++) {
    b = adj[nod][i].first;
    if (!del[adj[nod][i].second] && vis[b] != v) dfs(b);
  }
  return;
}
void rec(int nod, char c) {
  int i, u;
  for (i = 0; i < adj[nod].size(); i++)
    if (!del[adj[nod][i].second]) break;
  if (i == adj[nod].size()) {
    ans[nod] = c;
    return;
  }
  m = 0;
  v++;
  dfs(nod);
  v++;
  u = find(nod);
  ans[u] = c;
  for (i = 0; i < adj[u].size(); i++)
    if (!del[adj[u][i].second]) {
      del[adj[u][i].second] = 1;
      rec(adj[u][i].first, c + 1);
    }
  return;
}
void solve() {
  read();
  rec(1, 'A');
  for (int i = 1; i <= n; i++) printf("%c ", ans[i]);
  puts("");
  return;
}
int main() {
  solve();
  return 0;
}
