#include <bits/stdc++.h>
using namespace std;
vector<int> adj[100005];
int size[100005];
bool removed[100005];
int c[100005];
void compute_subtree(int u, int p = -1) {
  size[u] = 1;
  for (int v : adj[u]) {
    if (v == p || removed[v]) continue;
    compute_subtree(v, u);
    size[u] += size[v];
  }
}
int find_centroid(int u) {
  compute_subtree(u);
  int tree_size = size[u];
  bool found = false;
  while (!found) {
    found = true;
    for (int v : adj[u]) {
      if (removed[v] || size[v] > size[u]) continue;
      if (size[v] > tree_size / 2) {
        found = false;
        u = v;
        break;
      }
    }
  }
  return u;
}
void dfs(int u, int p) {
  u = find_centroid(u);
  if (p == 0)
    c[u] = 1;
  else
    c[u] = c[p] + 1;
  removed[u] = true;
  for (int v : adj[u]) {
    if (!removed[v]) {
      dfs(v, u);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1, 0);
  for (int i = 1; i <= n; i++) {
    char z = 'A' + c[i];
    if (i == n)
      cout << z << endl;
    else
      cout << z << ' ';
  }
}
