#include <bits/stdc++.h>
using namespace std;
long long int powmod(long long int a, int b, int n) {
  long long int rm = 1;
  while (b) {
    if (b % 2) {
      rm = (rm * a) % n;
    }
    a = (a * a) % n;
    b /= 2;
  }
  return rm;
}
int n, m, size[int(1e5 + 10)] = {0}, deleted[int(1e5 + 10)] = {0},
                         color[int(1e5 + 10)] = {0};
vector<int> edge[int(1e5 + 10)];
int p[int(1e5 + 10)];
int far, farNode;
void dfs(int cur, int prev, int d) {
  if (deleted[cur]) return;
  p[cur] = prev;
  if (d > far) far = d, farNode = cur;
  for (int i = 0; i < edge[cur].size(); ++i)
    if (edge[cur][i] != prev) dfs(edge[cur][i], cur, d + 1);
}
int getcenter(int cur) {
  far = -1;
  farNode = 0;
  dfs(cur, -1, 0);
  far = -1;
  dfs(farNode, -1, 0);
  for (int i = 0; i < far / 2; ++i) farNode = p[farNode];
  return farNode;
}
void solve(int cur, int d) {
  if (deleted[cur]) return;
  cur = getcenter(cur);
  deleted[cur] = 1;
  color[cur] = d;
  for (int i = 0; i < edge[cur].size(); ++i) solve(edge[cur][i], d - 1);
}
int main() {
  int u, v;
  int root = 1;
  cin >> n;
  for (int i = int(1); i <= (int)n - 1; i++) {
    cin >> u >> v;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  int hashing[50];
  solve(1, 26);
  for (int i = 1; i <= 26; ++i) hashing[i] = 'A' + (26 - i + 1) - 1;
  for (int i = 1; i <= n; ++i) cout << (char)hashing[color[i]] << " ";
  cout << endl;
  return 0;
}
