#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
template <typename T>
T getint() {
  T val = 0;
  char c;
  while ((c = getchar()) && !(c >= '0' && c <= '9'))
    ;
  do {
    val = (val * 10) + c - '0';
  } while ((c = getchar()) && (c >= '0' && c <= '9'));
  return val;
}
const int maxn = 100001;
vector<int> adj[maxn];
int n;
int banned[maxn];
int sz[maxn];
void dfs0(int x, int p = -1) {
  sz[x] = 1;
  for (auto i : adj[x]) {
    if (i == p || banned[i]) continue;
    dfs0(i, x);
    sz[x] += sz[i];
  }
}
int dfs1(int x, int p, int nn) {
  int ind = -1;
  for (auto i : adj[x]) {
    if (banned[i] || i == p) continue;
    if (sz[i] > nn / 2) ind = i;
  }
  if (ind != -1) return dfs1(ind, x, nn);
  return x;
}
vector<int> cadj[maxn];
int cpar[maxn];
int decompose(int x = 1) {
  dfs0(x);
  int centroid = dfs1(x, -1, sz[x]);
  banned[centroid] = 1;
  for (auto i : adj[centroid]) {
    if (!banned[i]) {
      int child = decompose(i);
      cadj[centroid].push_back(child);
      cpar[child] = centroid;
    }
  }
  return centroid;
}
char ans[maxn];
void dfs(int x, int lvl = 0) {
  ans[x] = lvl + 'A';
  for (auto i : cadj[x]) {
    dfs(i, lvl + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  int root = decompose();
  dfs(root);
  for (int i = 1; i <= n; ++i) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
