#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
vector<int> g[N];
int sub[N];
bool done[N];
int lvl[N];
void dfs0(int u, int p) {
  sub[u] = 1;
  for (int v : g[u]) {
    if (v != p and !done[v]) {
      dfs0(v, u);
      sub[u] += sub[v];
    }
  }
}
int cur_n;
int find_centroid(int u, int p) {
  for (int v : g[u]) {
    if (v != p and !done[v] and 2 * sub[v] > cur_n) return find_centroid(v, u);
  }
  return u;
}
void decomp(int root, int l) {
  dfs0(root, -1);
  cur_n = sub[root];
  int c = find_centroid(root, -1);
  lvl[c] = l;
  done[c] = true;
  for (int v : g[c]) {
    if (!done[v]) decomp(v, l + 1);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  decomp(1, 0);
  for (int i = 1; i <= n; i++) printf("%c%c", 'A' + lvl[i], " \n"[i == n]);
  return 0;
}
