#include <bits/stdc++.h>
using namespace std;
bool cal[100001];
long long int dp[1000001] = {0};
long long int ran[100001] = {0};
long long int pos[100001] = {0};
long long int pos1 = 0;
long long int ind = -1;
vector<long long int> arr[100001];
void dfs1(long long int s, long long int pra) {
  dp[s] = 1;
  for (long long int i : arr[s]) {
    if (i != pra && !cal[i]) {
      dfs1(i, s);
      dp[s] += dp[i];
    }
    if (cal[i]) {
      if (pos[i] > pos1) {
        pos1 = pos[i];
        ind = i;
      }
    }
  }
}
bool h = false;
long long int ans = 0;
long long int pr = -1;
long long int mi = -1;
void dfs2(long long int s, long long int pra, long long int e) {
  for (long long int i : arr[s]) {
    if (i != pra && !cal[i]) {
      dfs2(i, s, e);
    }
    if (cal[i]) {
      if (ran[i] > mi) {
        mi = ran[i];
        pr = i;
      }
    }
  }
  if (dp[s] >= dp[e] / 2 && !h) {
    h = true;
    ans = s;
  }
}
int main() {
  memset(cal, false, sizeof(cal));
  long long int n;
  cin >> n;
  long long int a[n + 1], b[n + 1];
  set<long long int> ar;
  for (int x = 0; x < n - 1; x++) {
    cin >> a[x] >> b[x];
    ar.insert(x + 1);
    arr[a[x]].push_back(b[x]);
    arr[b[x]].push_back(a[x]);
  }
  ar.insert(n);
  long long int pre[n + 1];
  memset(pre, -1, sizeof(pre));
  long long int head = -1;
  char qw[n + 1];
  while (!ar.empty()) {
    h = false;
    ans = 0;
    mi = 0;
    pr = -1;
    pos1 = 0;
    ind = -1;
    long long int it = *ar.begin();
    dfs1(it, -1);
    dfs2(it, -1, it);
    cal[ans] = true;
    ran[ans] = mi + 1;
    pre[ans] = pr;
    pos[ans] = pos1 + 1;
    qw[ans] = char(pos[ans] + 64);
    ar.erase(ans);
  }
  for (int x = 1; x <= n; x++) cout << qw[x] << " ";
}
