#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void maxa(T& a, T b) {
  a = max(a, b);
}
template <typename T>
inline void mina(T& a, T b) {
  a = min(a, b);
}
const int mxN = 1e5 + 5;
set<int> graph[mxN];
char ans[mxN];
int sub[mxN], n, a, b;
int dfs(int at, int p) {
  int ret = 1;
  for (int i : graph[at]) {
    if (i == p) continue;
    ret += dfs(i, at);
  }
  return sub[at] = ret;
}
int centroid(int at, int p, int s) {
  for (int i : graph[at]) {
    if (i == p) continue;
    if (sub[i] * 2 >= s) return centroid(i, at, s);
  }
  return at;
}
void build(int at, int p, char let) {
  int s = dfs(at, p);
  int cent = centroid(at, p, s);
  ans[cent] = let;
  for (int i : graph[cent]) {
    graph[i].erase(cent);
    build(i, at, let + 1);
  }
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    graph[a].insert(b);
    graph[b].insert(a);
  }
  build(1, -1, 'A');
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
