#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v[200000];
char result[200000];
int es[200000], H[200000];
int find_es(int nod, int pre) {
  int res = 1, len = v[nod].size(), x;
  for (int i = 0; i <= len - 1; i++) {
    x = v[nod][i].first;
    if (H[v[nod][i].second] or x == pre) continue;
    res += find_es(x, nod);
  }
  return es[nod] = res;
}
int bul(int n, int nod, int pre) {
  int len = v[nod].size(), x, t, sum = 0;
  for (int i = 0; i <= len - 1; i++) {
    x = v[nod][i].first;
    if (H[v[nod][i].second] or x == pre) continue;
    sum += es[x];
    if (es[x] > (n + 1) / 2) return bul(n, x, nod);
  }
  return nod;
}
void rec(int nod, char c) {
  int n = find_es(nod, 0);
  int x = bul(n, nod, 0);
  int len = v[x].size();
  result[x] = c;
  for (int i = 0; i <= len - 1; i++)
    if (!H[v[x][i].second]) {
      H[v[x][i].second] = 1;
      rec(v[x][i].first, c + 1);
    }
}
int main() {
  int n, x, y;
  cin >> n;
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d %d", &x, &y);
    v[x].push_back(make_pair(y, i));
    v[y].push_back(make_pair(x, i));
  }
  rec(1, 'A');
  for (int i = 1; i <= n; i++) printf("%c ", result[i]);
  cout << endl;
}
