#include <bits/stdc++.h>
const int MX = 100005;
using namespace std;
vector<int> g[2 * MX];
vector<int> v[MX];
int visit[MX];
int subsz[MX];
int centroid_parent[MX];
char ans[MX];
void dfs(int nod, int par) {
  subsz[nod] = 1;
  for (int i = 0; i < (int)(v[nod].size()); i++) {
    int nn = v[nod][i];
    if (nn != par && !visit[nn]) {
      dfs(nn, nod);
      subsz[nod] += subsz[nn];
    }
  }
}
int find_centroid(int nod, int par, int root) {
  for (int i = 0; i < (int)(v[nod].size()); i++) {
    int nn = v[nod][i];
    if (visit[nn] || nn == par) {
      continue;
    }
    if (subsz[nn] > subsz[root] / 2) {
      return find_centroid(nn, nod, root);
    }
  }
  return nod;
}
int decompose(int nod) {
  dfs(nod, -1);
  int centroid = find_centroid(nod, -1, nod);
  visit[centroid] = 1;
  for (int i = 0; i < (int)(v[centroid].size()); i++) {
    int nn = v[centroid][i];
    if (visit[nn]) {
      continue;
    }
    g[centroid].push_back(decompose(nn));
    centroid_parent[g[centroid].back()] = centroid;
  }
  return centroid;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  int root = decompose(1);
  queue<pair<int, char> > qq;
  qq.push(make_pair(root, 'A'));
  while (!qq.empty()) {
    pair<int, char> pp = qq.front();
    qq.pop();
    int nod = pp.first;
    char label = pp.second;
    ans[nod] = label;
    for (int i = 0; i < (int)(g[nod].size()); i++) {
      int nn = g[nod][i];
      qq.push(make_pair(nn, label + 1));
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
