#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void dout() { cerr << endl; }
template <typename Head, typename... Tail>
void dout(Head H, Tail... T) {
  cerr << H << ' ';
  dout(T...);
}
vector<vector<int>> g;
vector<int> sz;
vector<char> removed;
vector<char> ans;
int dfs_sz(int u, int p) {
  sz[u] = 1;
  for (auto v : g[u]) {
    if (v != p && !removed[v]) {
      sz[u] += dfs_sz(v, u);
    }
  }
  return sz[u];
}
void solve(int u, char c) {
  int s = dfs_sz(u, -1);
  int p = -1;
  bool found;
  do {
    found = true;
    for (auto v : g[u]) {
      if (v != p && !removed[v] && sz[v] * 2 > s) {
        p = u;
        u = v;
        found = false;
        break;
      }
    }
  } while (!found);
  removed[u] = true;
  ans[u] = c;
  for (auto v : g[u]) {
    if (!removed[v]) solve(v, c + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  g.resize(n);
  sz.resize(n);
  removed.resize(n);
  ans.resize(n);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  solve(0, 'A');
  for (auto c : ans) {
    cout << c << ' ';
  }
  return 0;
}
