#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int P = 998244353;
const int INF = 0x3f3f3f3f;
inline int mul(const int& a, const int& b) { return 1ll * a * b % P; }
inline int add(const int& a, const int& b) {
  return (a + b >= P) ? a + b - P : a + b;
}
inline int sub(const int& a, const int& b) {
  return (a - b < 0) ? a - b + P : a - b;
}
inline int read() {
  int x(0), w(1);
  char c = getchar();
  while (c ^ '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') w = -1, c = getchar();
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * w;
}
int n, rt, S, x, y, maxp[N], sz[N], vis[N], ans[N];
int head[N], nxt[N << 1], to[N << 1], cnte;
inline void addedge(int u, int v) {
  to[++cnte] = v;
  nxt[cnte] = head[u];
  head[u] = cnte;
}
void getrt(int u, int Fa) {
  maxp[u] = 0;
  sz[u] = 1;
  for (int i = head[u]; i; i = nxt[i]) {
    if (to[i] == Fa || vis[to[i]]) continue;
    getrt(to[i], u);
    sz[u] += sz[to[i]];
    maxp[u] = max(maxp[u], sz[to[i]]);
  }
  maxp[u] = max(maxp[u], S - sz[u]);
  if (maxp[u] < maxp[rt]) rt = u;
}
void solve(int u, char c) {
  ans[u] = c;
  vis[u] = 1;
  for (int i = head[u]; i; i = nxt[i]) {
    if (vis[to[i]]) continue;
    maxp[rt = 0] = INF;
    S = sz[to[i]];
    getrt(to[i], -1);
    solve(rt, c + 1);
  }
}
int main() {
  n = read();
  for (int i = 1; i < n; ++i) {
    x = read(), y = read();
    addedge(x, y);
    addedge(y, x);
  }
  maxp[rt] = INF;
  S = n;
  getrt(1, -1);
  solve(rt, 'A');
  for (int i = 1; i <= n; ++i) {
    printf("%c ", ans[i]);
  }
  return 0;
}
