#include <bits/stdc++.h>
using namespace std;
vector<long long> vr[100005], cr[100005];
long long n, rem[100005], pr[100005], sr[100005];
long long cent_dec(long long, long long, char);
long long dfs(long long, long long);
long long get_cent(long long);
char ans[100005];
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    vr[x].push_back(y);
    vr[y].push_back(x);
  }
  cent_dec(1, -1, 'A');
  for (int i = 1; i < n + 1; i++) cout << ans[i] << " ";
}
long long cent_dec(long long idx, long long p, char ch) {
  long long c = get_cent(idx);
  pr[c] = p;
  ans[c] = ch;
  if (p != -1) cr[p].push_back(c);
  rem[c] = true;
  for (int i = 0; i < vr[c].size(); i++) {
    if (!rem[vr[c][i]]) cent_dec(vr[c][i], c, ch + 1);
  }
  return c;
}
long long dfs(long long idx, long long p) {
  sr[idx] = 1;
  for (int i = 0; i < vr[idx].size(); i++) {
    if (vr[idx][i] != p && !rem[vr[idx][i]]) sr[idx] += dfs(vr[idx][i], idx);
  }
  return sr[idx];
}
long long get_cent(long long idx) {
  long long cap = dfs(idx, -1) / 2;
  long long p = -1;
  while (1) {
    bool found = false;
    for (int i = 0; i < vr[idx].size(); i++) {
      if (!rem[vr[idx][i]] && vr[idx][i] != p && sr[vr[idx][i]] > cap) {
        p = idx;
        idx = vr[idx][i];
        found = true;
        break;
      }
    }
    if (!found) return idx;
  }
}
