#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> edges;
vector<bool> vis;
vector<int> sz;
vector<vector<int>> c_edges;
vector<int> c_pr;
vector<bool> isCentroid;
int root = -1;
vector<char> ans;
void dfs(int u, int pr = -1) {
  sz[u] = 1;
  for (auto v : edges[u]) {
    if (v == pr || isCentroid[v]) {
      continue;
    }
    dfs(v, u);
    sz[u] += sz[v];
  }
}
int findCentroid(int u, int pr = -1) {
  int centroid = u;
  dfs(u, pr);
  int cur = u;
  while (true) {
    bool ch = true;
    for (auto v : edges[cur]) {
      if (isCentroid[v]) {
        continue;
      }
      if (sz[v] > sz[u] / 2 && sz[centroid] > sz[v]) {
        centroid = v;
        cur = v;
        ch = false;
        break;
      }
    }
    if (ch) {
      break;
    }
  }
  if (root == -1) {
    root = centroid;
  }
  isCentroid[centroid] = true;
  for (auto v : edges[centroid]) {
    if (isCentroid[v]) {
      continue;
    }
    int _v = findCentroid(v, centroid);
    c_edges[centroid].push_back(_v);
    c_edges[_v].push_back(centroid);
  }
  return centroid;
}
void c_dfs(int u, int rank = 0) {
  vis[u] = true;
  ans[u] = 'A' + rank;
  for (auto v : c_edges[u]) {
    if (!vis[v]) {
      c_dfs(v, rank + 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  edges.resize(n);
  vis.resize(n);
  sz.resize(n);
  c_edges.resize(n);
  c_pr.resize(n);
  ans.resize(n);
  isCentroid.resize(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    edges[a].push_back(b);
    edges[b].push_back(a);
  }
  findCentroid(0);
  c_dfs(root);
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cin >> n;
  return 0;
}
