#include <bits/stdc++.h>
using namespace std;
int n, u, v;
vector<int> g[100002];
int vis[100002], sub[100002];
set<int> centroids;
vector<int> centroid[100];
int dfs(int u) {
  vis[u] = 1;
  int res = 1;
  for (int i = 0; i < g[u].size(); i++) {
    if (vis[g[u][i]] or centroids.find(g[u][i]) != centroids.end()) continue;
    res += dfs(g[u][i]);
  }
  sub[u] = res;
  vis[u] = 0;
  return res;
}
int findCentroid(int u, int n) {
  int mx = 0;
  int mxnode;
  vis[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    if (vis[g[u][i]] or centroids.find(g[u][i]) != centroids.end()) continue;
    if (sub[g[u][i]] > mx) {
      mx = sub[g[u][i]];
      mxnode = g[u][i];
    }
  }
  if (mx <= n / 2) return u;
  mx = findCentroid(mxnode, n);
  vis[u] = 0;
  return mx;
}
int L = 0;
char s[100002];
void decompose(int u, int l) {
  int res = dfs(u);
  int ctr = findCentroid(u, res);
  centroid[l].push_back(ctr);
  centroids.insert(ctr);
  L = max(l, L);
  for (int i = 0; i < g[ctr].size(); i++) {
    if (centroids.find(g[ctr][i]) != centroids.end()) continue;
    decompose(g[ctr][i], l + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  decompose(0, 0);
  for (int i = 0; i <= L; i++)
    for (int j = 0; j < centroid[i].size(); j++) s[centroid[i][j]] = 'A' + i;
  for (int i = 0; i < n; i++) cout << s[i] << " \n"[i == n - 1];
}
