#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 20;
vector<int> G[maxn];
int n;
int num[maxn], ma[maxn], ans[maxn], now[maxn];
int cnt;
void dfs(int u, int fa) {
  num[u] = 1;
  ma[u] = 0;
  now[cnt++] = u;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v != fa && ans[v] == 0) {
      dfs(v, u);
      num[u] += num[v];
      ma[u] = max(ma[u], num[v]);
    }
  }
}
void solve(int root, int val) {
  cnt = 0;
  dfs(root, 0);
  int zxn = 0x3f3f3f3f, zx;
  for (int i = 0; i < cnt; i++) {
    int u = now[i];
    ma[u] = max(ma[u], cnt - num[u]);
    if (zxn > ma[u]) {
      zxn = ma[u];
      zx = u;
    }
  }
  ans[zx] = val;
  for (int i = 0; i < G[zx].size(); i++) {
    int v = G[zx][i];
    if (ans[v] == 0) {
      solve(v, val + 1);
    }
  }
}
int main() {
  scanf("%d", &n);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  solve(1, 1);
  for (int i = 1; i <= n; i++) {
    printf("%c%c", 'A' + ans[i] - 1, i == n ? '\n' : ' ');
  }
  return 0;
}
