#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, sz[N], f[N];
char ans[N];
vector<int> adj[N];
void DFS(int u) {
  sz[u] = 1;
  for (int v : adj[u]) {
    if (!sz[v] && !f[v]) {
      DFS(v);
      sz[u] += sz[v];
    }
  }
}
int getRoot(int u, int mx, int p = 0) {
  for (int v : adj[u])
    if (v != p && !f[v] && sz[v] > mx) return getRoot(v, mx, u);
  return u;
}
void solve(int u, int c) {
  DFS(u);
  int mx = sz[u] >> 1;
  int root = getRoot(u, mx);
  ans[root] = c + 'A';
  f[root] = 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int x = 0; x < 20; ++x) {
    memset(sz, 0, sizeof sz);
    for (int u = 1; u <= n; ++u)
      if (!f[u] && !sz[u]) solve(u, x);
  }
  for (int u = 1; u <= n; ++u) printf("%c ", ans[u]);
  return 0;
}
