#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> graph;
vector<int> done;
vector<int> depth;
vector<int> subtree_size;
void dfs(int u, int p, int &centroid, int &best, int &component_size) {
  subtree_size[u] = 1;
  int largest = 0;
  for (int v : graph[u]) {
    if (done[v] || v == p) continue;
    dfs(v, u, centroid, best, component_size);
    subtree_size[u] += subtree_size[v];
    largest = max(largest, subtree_size[v]);
  }
  largest = max(largest, component_size - subtree_size[u]);
  if (largest < best) {
    centroid = u;
    best = largest;
  }
}
void solve(int u, int d, int component_size) {
  int centroid = -1;
  int best = 1e9;
  dfs(u, -1, centroid, best, component_size);
  done[centroid] = 1;
  depth[centroid] = d;
  for (int v : graph[centroid])
    if (!done[v])
      solve(v, d + 1,
            (subtree_size[v] > subtree_size[centroid])
                ? component_size - subtree_size[centroid]
                : subtree_size[v]);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  graph.resize(n);
  done.resize(n);
  depth.resize(n);
  subtree_size.resize(n);
  for (int i = 1; i != n; ++i) {
    int u, v;
    cin >> u >> v;
    graph[u - 1].push_back(v - 1);
    graph[v - 1].push_back(u - 1);
  }
  solve(0, 0, n);
  for (int i = 0; i != n; ++i) cout << char('A' + depth[i]) << '\n';
  return 0;
}
