#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void debug() { cerr << "\n"; }
template <typename Head, typename... Tail>
void debug(Head H, Tail... T) {
  cerr << H << " ";
  debug(T...);
}
const int maxn = 1e5 + 10;
vector<int> g[maxn];
vector<int> subtree(maxn);
int nodes;
map<int, char> mp;
void dfs(int u, int p = -1) {
  nodes++;
  subtree[u] = 1;
  for (auto it : g[u]) {
    if (it == p) continue;
    dfs(it, u);
    subtree[u] += subtree[it];
  }
}
int centroid(int u, int p = -1) {
  for (auto it : g[u]) {
    if (it == p) continue;
    if (subtree[it] > (nodes >> 1)) return centroid(it, u);
  }
  return u;
}
void decompose(int u, char ch) {
  nodes = 0;
  dfs(u);
  int c = centroid(u);
  mp[c] = ch;
  for (auto it : g[c]) {
    g[it].erase(find(g[it].begin(), g[it].end(), c));
    decompose(it, ch + 1);
  }
}
void solve() {
  ll n;
  cin >> n;
  ll u, v;
  for (ll i = 0; i < n - 1; ++i) {
    cin >> u >> v;
    g[u].emplace_back(v);
    g[v].emplace_back(u);
  }
  decompose(1, 'A');
  for (ll i = 1; i <= n; ++i) cout << mp[i] << " ";
  cout << "\n";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ll t;
  t = 1;
  for (ll i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
