#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> G[100100];
bool deleted[100100];
char ans[100100];
int sz[100100];
void dfs1(int u, int pi) {
  sz[u] = 1;
  for (int i = (0); i < (G[u].size()); i++) {
    int v = G[u][i];
    if ((v != pi) and (!deleted[v])) {
      dfs1(v, u);
      sz[u] += sz[v];
    }
  }
}
int centroid(int u) {
  dfs1(u, -1);
  int best = u;
  int bmax = 0;
  int up = 0;
  int pi = -1;
  for (int i = (0); i < (G[u].size()); i++) {
    int v = G[u][i];
    if (!deleted[v]) {
      bmax = (((bmax) > (sz[v])) ? (bmax) : (sz[v]));
    }
  }
  if (bmax == 0) return u;
  while (sz[u] > 1) {
    int mv = -1;
    for (int i = (0); i < (G[u].size()); i++) {
      int v = G[u][i];
      if ((!deleted[v]) and (v != pi)) {
        if ((mv == -1) or (sz[v] > sz[mv])) {
          mv = v;
        }
      }
    }
    up += sz[u] - sz[mv];
    pi = u;
    u = mv;
    int cmax = up;
    for (int i = (0); i < (G[u].size()); i++) {
      int v = G[u][i];
      if ((!deleted[v]) and (v != pi)) {
        cmax = (((cmax) > (sz[v])) ? (cmax) : (sz[v]));
      }
    }
    if (cmax < bmax) {
      best = u;
      bmax = cmax;
    }
  }
  return best;
}
void decompose(int u, char mp) {
  u = centroid(u);
  ans[u] = mp;
  deleted[u] = true;
  for (int i = (0); i < (G[u].size()); i++) {
    if (!deleted[G[u][i]]) {
      decompose(G[u][i], mp + 1);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int u, v;
  for (int i = (1); i <= (n - 1); i++) {
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = (1); i <= (n); i++) deleted[i] = false;
  decompose(1, 'A');
  for (int i = (1); i < (n); i++) {
    cout << ans[i] << " ";
  }
  cout << ans[n] << endl;
  return 0;
}
