#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    T t = bigmod(p, e / 2, M);
    return (t * t) % M;
  }
  return (bigmod(p, e - 1, M) * p) % M;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T multimod(T a, T b, T m) {
  T ans = 0ll;
  a %= m, b %= m;
  while (b) {
    if (b & 1ll) ans = m - ans > a ? (ans + a) : (ans + a - m);
    b >>= 1ll;
    a = (m - a) > a ? a + a : a + a - m;
  }
  return (T)ans;
}
int sz[(200000 + 7)];
int ans[(200000 + 7)];
vector<int> V[(200000 + 7)];
bool vis[(200000 + 7)];
void DFS(int u, int par) {
  sz[u] = 1;
  int s = V[u].size();
  for (int i = 0; i < s; i++) {
    int v = V[u][i];
    if (!vis[v] && v != par) {
      DFS(v, u);
      sz[u] += sz[v];
    }
  }
}
void decompose(int u, int par, int depth) {
  DFS(u, par);
  int tot = sz[u];
  while (true) {
    int s = V[u].size();
    int i;
    for (i = 0; i < s; i++) {
      int v = V[u][i];
      if (v == par || vis[v]) continue;
      if (sz[v] >= tot / 2) {
        par = u;
        u = v;
        i = 0;
        break;
      }
    }
    if (i == s) break;
  }
  ans[u] = depth;
  vis[u] = 1;
  int s = V[u].size();
  for (int i = 0; i < s; i++) {
    int v = V[u][i];
    if (vis[v]) continue;
    decompose(v, u, depth + 1);
  }
  return;
}
int main() {
  int j, i;
  int a, t, n, b, u, v, cases = 1;
  cin >> n;
  for (i = 0; i < n - 1; i++) {
    cin >> u >> v;
    V[u].push_back(v);
    V[v].push_back(u);
  }
  decompose(1, 0, 1);
  for (i = 1; i <= n; i++) cout << (char)(ans[i] + 'A' - 1) << " ";
  return 0;
}
