#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<int> order, sizes;
int find_centroid(int v) {
  function<void(int, int)> find_sizes = [&](int v, int p) {
    sizes[v] = 1;
    for (int to : g[v]) {
      if (p == to || order[to] != -1) continue;
      find_sizes(to, v);
      sizes[v] += sizes[to];
    }
  };
  find_sizes(v, -1);
  int n = sizes[v];
  function<int(int, int)> find = [&](int v, int p) {
    for (int to : g[v]) {
      if (p == to || order[to] != -1) continue;
      if (sizes[to] > n / 2) {
        return find(to, v);
      }
    }
    return v;
  };
  return find(v, -1);
}
void find_decomposition() {
  function<void(int, int)> get_centroid = [&](int v, int depth) {
    int c = find_centroid(v);
    order[c] = depth;
    for (int to : g[c]) {
      if (order[to] == -1) {
        get_centroid(to, depth + 1);
      }
    }
  };
  get_centroid(0, 0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  g.resize(n);
  sizes.resize(n);
  order.resize(n, -1);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  find_decomposition();
  for (auto &i : order) {
    cout << char('A' + i) << " ";
  }
  cout << endl;
}
