#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n;
vector<int> e[maxn];
int ans[maxn];
int have[maxn][27];
void dfs(int cur, int from) {
  for (int i = 0; i < e[cur].size(); i++) {
    int t = e[cur][i];
    if (t == from) continue;
    dfs(t, cur);
    for (int j = 0; j < 26; j++) have[cur][j] += have[t][j];
  }
  int maxT = -1;
  for (int i = 0; i < 26; i++)
    if (have[cur][i] >= 2) maxT = max(maxT, i);
  maxT++;
  while (have[cur][maxT] > 0) maxT++;
  for (int i = 0; i < maxT; i++) have[cur][i] = 0;
  have[cur][maxT]++;
  ans[cur] = maxT;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) e[i].clear();
    memset(ans, 0, sizeof(ans));
    memset(have, 0, sizeof(have));
    int u, v;
    for (int i = 0; i < n - 1; i++) {
      scanf("%d%d", &u, &v);
      e[u].push_back(v);
      e[v].push_back(u);
    }
    dfs(1, -1);
    for (int i = 1; i <= n; i++)
      printf("%c%c", char('Z' - ans[i]), i == n ? '\n' : ' ');
  }
  return 0;
}
