#include <bits/stdc++.h>
using namespace std;
const long long INF = 2147483647;
const long long INFL = 9223372036854775807LL;
const double EPSILON = 0.00000001;
const long long MOD = 1000000007;
vector<long long> adj[100000 + 5];
bool deleted[100000 + 5];
long long tree_size[100000 + 5];
char ans[100000 + 5];
long long dfs(long long cur, long long parent) {
  long long size = 1;
  for (auto it = adj[cur].begin(); it != adj[cur].end(); it++) {
    if (*it != parent && !deleted[*it]) {
      size += dfs(*it, cur);
    }
  }
  tree_size[cur] = size;
  return size;
}
long long find_centroid(long long cur, long long parent, long long n) {
  for (auto it = adj[cur].begin(); it != adj[cur].end(); it++) {
    if (*it != parent && !deleted[*it] && tree_size[*it] >= (n + 1) / 2) {
      return find_centroid(*it, cur, n);
    }
  }
  return cur;
}
void centroid_decomposition(long long root, long long depth, long long n) {
  if (n == 1) {
    ans[root] = 'A' + depth;
    return;
  }
  dfs(root, -1);
  long long centroid = find_centroid(root, -1, n);
  deleted[centroid] = true;
  ans[centroid] = 'A' + depth;
  for (auto it = adj[centroid].begin(); it != adj[centroid].end(); it++) {
    if (!deleted[*it]) {
      if (tree_size[*it] < tree_size[centroid])
        centroid_decomposition(*it, depth + 1, tree_size[*it]);
      else
        centroid_decomposition(*it, depth + 1,
                               tree_size[root] - tree_size[centroid]);
    }
  }
}
int32_t main() {
  memset(deleted, false, sizeof(deleted));
  ;
  long long n;
  scanf("%lld", &n);
  ;
  for (long long i = 0; i < n - 1; i++) {
    long long u, v;
    scanf("%lld", &u);
    ;
    scanf("%lld", &v);
    ;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  centroid_decomposition(0, 0, n);
  for (long long i = 0; i < n; i++) {
    putchar(ans[i]);
    putchar(' ');
  }
  putchar('\n');
  return 0;
}
