#include <bits/stdc++.h>
using namespace std;
int fastMax(int x, int y) { return (((y - x) >> (32 - 1)) & (x ^ y)) ^ y; }
int fastMin(int x, int y) { return (((y - x) >> (32 - 1)) & (x ^ y)) ^ x; }
const long long int MAXN = 1e5 + 5;
set<long long int> graph[MAXN];
long long int subtree[MAXN];
long long int nodes, color[MAXN];
void dfs_for_subtree_sum(long long int u, long long int p) {
  nodes++;
  subtree[u] = 1;
  for (long long int v : graph[u]) {
    if (v == p) continue;
    dfs_for_subtree_sum(v, u);
    subtree[u] += subtree[v];
  }
}
long long int dfs_for_centroid(long long int u, long long int p) {
  for (long long int v : graph[u]) {
    if (v != p && subtree[v] > nodes / 2) return dfs_for_centroid(v, u);
  }
  return u;
}
void decompose(long long int root, long long int p, char ch) {
  nodes = 0;
  dfs_for_subtree_sum(root, root);
  long long int centroid = dfs_for_centroid(root, root);
  if (p == -1) p = centroid;
  color[centroid] = ch;
  for (long long int v : graph[centroid]) {
    graph[v].erase(centroid);
    decompose(v, centroid, ch + 1);
  }
  graph[centroid].clear();
}
void solve() {
  long long int n;
  cin >> n;
  for (int i = (1); i <= (n - 1); ++i) {
    long long int u, v;
    cin >> u >> v;
    graph[u].insert(v);
    graph[v].insert(u);
  }
  decompose(1, -1, 0);
  for (int i = (1); i <= (n); ++i) cout << (char)(color[i] + 'A') << " ";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  t = 1;
  while (t--) solve();
}
