#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
vector<int> AdjList[maxn];
bool vis[maxn];
int child[maxn];
char ans[maxn];
int n;
void dfs(int s, int p = -1) {
  child[s] = 1;
  for (int u : AdjList[s]) {
    if (vis[u]) continue;
    if (u == p) continue;
    dfs(u, s);
    child[s] += child[u];
  }
}
int find_cen(int s, int p, int sz) {
  for (int u : AdjList[s]) {
    if (vis[u]) continue;
    if (u == p) continue;
    if (child[u] * 2 > sz) return find_cen(u, s, sz);
  }
  return s;
}
void centroid(int u, char c) {
  dfs(u, u);
  int cen = find_cen(u, u, child[u]);
  ans[cen] = c;
  vis[cen] = 1;
  for (int v : AdjList[cen]) {
    if (vis[v]) continue;
    centroid(v, c + 1);
  }
}
signed main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    AdjList[u].push_back(v);
    AdjList[v].push_back(u);
  }
  centroid(1, 'A');
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << ' ';
  }
}
