#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, nodes;
long long subtree[N];
char ans[N];
set<long long> g[N];
void dfs(long long k, long long parent) {
  nodes++;
  subtree[k] = 1;
  for (auto it : g[k]) {
    if (it == parent) continue;
    dfs(it, k);
    subtree[k] += subtree[it];
  }
}
long long centroid(long long k, long long parent) {
  for (auto it : g[k]) {
    if (it == parent) continue;
    if (subtree[it] > (nodes >> 1)) return centroid(it, k);
  }
  return k;
}
void decompose(long long k, char ch) {
  nodes = 0;
  dfs(k, k);
  long long node = centroid(k, k);
  ans[node] = ch;
  for (auto it : g[node]) {
    g[it].erase(node);
    decompose(it, ch + 1);
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 1; i <= n - 1; i++) {
    long long u, v;
    cin >> u >> v;
    g[u].insert(v);
    g[v].insert(u);
  }
  decompose(1, 'A');
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
