#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 20;
bool mark[M], visit[M], del[M];
int sub[M], _size[M], maxsub[M];
vector<int> adj[M];
int n, centroid;
char num[M];
void cst(int u) {
  visit[u] = true;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (!visit[v] && !del[v]) {
      cst(v);
      _size[u] += _size[v];
    }
  }
  return;
}
void dfs(int u, int cs) {
  mark[u] = true;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (!mark[v] && !del[v]) {
      dfs(v, cs);
      maxsub[u] = max(maxsub[u], _size[v]);
    }
  }
  maxsub[u] = max(maxsub[u], cs - (_size[u]));
  if (maxsub[u] <= cs / 2) centroid = u;
}
void clear() {
  fill(_size, _size + M, 1);
  fill(maxsub, maxsub + M, 0);
  fill(mark, mark + M, 0);
  fill(visit, visit + M, 0);
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int j = 0; j < 26; j++) {
    clear();
    for (int i = 0; i < n; i++) {
      if (!mark[i] && !del[i]) {
        cst(i);
        dfs(i, _size[i]);
        del[centroid] = true;
        num[centroid] = (char)(j + 'A');
      }
    }
  }
  for (int i = 0; i < n; i++) cout << num[i] << " ";
  return 0;
}
