#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 17;
int n, sz[MAXN];
bool mark[MAXN];
vector<int> adj[MAXN], all;
char ans[MAXN];
void dfs_sz(int v, int par = 0) {
  sz[v] = 1;
  for (auto i : adj[v])
    if (!mark[i] && i != par) dfs_sz(i, v), sz[v] += sz[i];
}
int centroid(int v, int par, int tree_size) {
  int res = 0;
  bool isok = false;
  for (auto i : adj[v])
    if (!mark[i] && i != par)
      res = max(res, centroid(i, v, tree_size)),
      isok |= (sz[i] > tree_size / 2);
  isok = !isok;
  if (sz[v] >= tree_size / 2 && isok) res = max(res, v);
  return res;
}
void dfs(int v, int par, vector<int> &comp) {
  comp.push_back(v);
  for (auto i : adj[v])
    if (i != par && !mark[i]) dfs(i, v, comp);
}
void DC(vector<int> &ver, int lev = 0) {
  if (ver.size() == 1) {
    ans[ver.back()] = 'A' + lev;
    return;
  }
  dfs_sz(ver.back());
  int C = centroid(ver.back(), 0, ver.size());
  mark[C] = true;
  ans[C] = 'A' + lev;
  vector<int> comp;
  for (auto i : adj[C])
    if (!mark[i]) dfs(i, 0, comp), DC(comp, lev + 1), comp.clear();
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    int v, u;
    cin >> v >> u;
    adj[v].push_back(u);
    adj[u].push_back(v);
    all.push_back(i);
  }
  all.push_back(n);
  DC(all);
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  return 0;
}
