#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
vector<int> sz, centroids, centroids_tree;
int ntemp;
int calc_size(int u, int p) {
  sz[u] = 1;
  for (int v : g[u]) {
    if (v != p && !centroids[v]) {
      sz[u] += calc_size(v, u);
    }
  }
  return sz[u];
}
int disc_centroid(int u, int p) {
  for (int v : g[u]) {
    if (v == p || centroids[v]) continue;
    if (sz[v] > ntemp / 2) return disc_centroid(v, u);
  }
  return u;
}
void find_centroid(int root, int p, int letra) {
  ntemp = calc_size(root, p);
  int c = disc_centroid(root, p);
  centroids[c] = 1;
  centroids_tree[c] = letra;
  for (int v : g[c]) {
    if (centroids[v]) continue;
    find_centroid(v, c, letra + 1);
  }
}
int main() {
  int n;
  cin >> n;
  g.assign(n, vector<int>());
  sz.assign(n, 0);
  centroids.assign(n, 0);
  centroids_tree.assign(n, 0);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  find_centroid(0, -1, 0);
  for (int i = 0; i < n; i++) {
    cout << (char)(centroids_tree[i] + 'A') << ' ';
  }
  return 0;
}
