#include <bits/stdc++.h>
using namespace std;
const int max_n = 1000 * 100 + 10;
vector<int> v[max_n];
char ans[max_n];
int sz[max_n];
bool mark[max_n];
void dfs(int u, int p) {
  sz[u] = 1;
  for (auto i : v[u])
    if (!mark[i] && i != p) {
      dfs(i, u);
      sz[u] += sz[i];
    }
}
void solve(int u, char c) {
  int p = -1, root = u;
  dfs(u, p);
  bool f = true;
  while (f) {
    f = false;
    for (auto i : v[u])
      if (!mark[i] && i != p && sz[i] > sz[root] / 2) {
        p = u;
        u = i;
        f = true;
        break;
      }
  }
  ans[u] = c;
  mark[u] = true;
  for (auto i : v[u])
    if (!mark[i]) solve(i, c + 1);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  solve(0, 'A');
  for (int i = 0; i < n; i++) printf("%c ", ans[i]);
}
