#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4, INF = 1e9;
int sub[N], par[N], nn, level[N];
set<int> adj[N];
vector<int> ar[N];
void dfs(int n, int p) {
  for (auto i : ar[n])
    if (i != p) level[i] = level[n] + 1, dfs(i, n);
}
void dfs1(int n, int p) {
  nn++;
  sub[n] = 1;
  for (auto i : adj[n])
    if (i != p) dfs1(i, n), sub[n] += sub[i];
}
int dfs2(int n, int p) {
  for (auto i : adj[n])
    if (i != p and sub[i] > nn / 2) return dfs2(i, n);
  return n;
}
void decompos(int n, int p) {
  nn = 0;
  dfs1(n, n);
  int centroid = dfs2(n, n);
  if (p == -1) p = centroid;
  par[centroid] = p;
  for (auto i : adj[centroid]) adj[i].erase(centroid), decompos(i, centroid);
  adj[centroid].clear();
}
int main() {
  int n, m, i, j, a, b;
  cin >> n;
  for (i = 1; i < n; i++) cin >> a >> b, adj[a].insert(b), adj[b].insert(a);
  decompos(1, -1);
  for (i = 1; i <= n; i++) {
    if (par[i] == i) {
      j = i;
      continue;
    }
    ar[i].push_back(par[i]);
    ar[par[i]].push_back(i);
  }
  dfs(j, -1);
  for (i = 1; i <= n; i++) cout << char(level[i] + 'A') << " ";
  cout << endl;
}
