#include <bits/stdc++.h>
using namespace std;
const int N = 111111;
int n;
int color[N];
vector<int> vec[N];
int fa[N];
int son[N];
int focus;
int dp[N];
void dfs(int u, int cnt) {
  dp[u] = 0;
  son[u] = 1;
  for (int i = 0; i < vec[u].size(); i++) {
    int v = vec[u][i];
    if (v == fa[u] || color[v] != -1) continue;
    fa[v] = u;
    dfs(v, cnt);
    son[u] += son[v];
    dp[u] = max(dp[u], son[v]);
  }
  dp[u] = max(dp[u], cnt - son[u]);
  if (focus == -1 || dp[focus] > dp[u]) focus = u;
}
void solve(int u, int cnt, int dep) {
  focus = -1;
  fa[u] = -1;
  dfs(u, cnt);
  color[u = focus] = dep;
  for (int i = 0; i < vec[u].size(); i++) {
    int v = vec[u][i];
    if (color[v] == -1) {
      solve(v, v == fa[u] ? cnt - son[u] : son[v], dep + 1);
    }
  }
}
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) vec[i].clear();
    for (int i = 1; i < n; i++) {
      int a, b;
      cin >> a >> b;
      vec[a].push_back(b);
      vec[b].push_back(a);
    }
    memset(color, -1, sizeof(color));
    solve(1, n, 0);
    for (int i = 1; i <= n; i++) {
      putchar(color[i] + 'A');
      putchar(' ');
    }
    puts("");
  }
  return 0;
}
