#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, k;
int t[200001], d[200001], sz[200001];
vector<list<int>> adj;
void prevs(int u, int pre, int& cur) {
  cur++;
  sz[u] = 1;
  for (int v : adj[u])
    if (v != pre) t[v] = u, prevs(v, u, cur), sz[u] += sz[v];
}
char res[200001];
int cnt[200001];
vector<int> ds;
void solve(int u, int pre, char cur) {
  int cur_sz = 0;
  prevs(u, pre, cur_sz);
  while (1) {
    int cand = -1;
    for (int v : adj[u]) {
      if (v == pre) continue;
      if (sz[v] > cur_sz / 2) cand = v;
    }
    if (cand != -1)
      pre = u, u = cand;
    else
      break;
  }
  res[u] = cur;
  for (int v : adj[u]) adj[v].remove(u), solve(v, u, cur + 1);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin >> n;
  adj.resize(n + 1);
  for (int i = 2; i <= n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].emplace_back(v);
    adj[v].emplace_back(u);
  }
  solve(1, -1, 'A');
  for (int i = 1; i <= n; i++) cout << res[i] << ' ';
}
