#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
template <class T>
void re(T& x) {
  cin >> x;
}
template <class H, class... T>
void re(H& h, T&... t) {
  re(h);
  re(t...);
}
template <class A>
void pr(A x) {
  cout << x;
}
template <class H, class... T>
void pr(const H& h, const T&... t) {
  pr(h);
  pr(t...);
}
void setIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
}
const int mxN = 100001;
vi adj[mxN];
int sz[mxN];
int N;
char ans[mxN];
void buildSz(int u, int p) {
  sz[u] = 1;
  for (auto& v : adj[u]) {
    if (v != p) {
      buildSz(v, u);
      sz[u] += sz[v];
    }
  }
}
int findCentroid(int u, int p, int n) {
  for (auto& v : adj[u]) {
    if (v != p && sz[v] > n) {
      return findCentroid(v, u, n);
    }
  }
  return u;
}
void erase(vi& v, int x) {
  for (int i = 0; i < v.size(); ++i) {
    if (v[i] == x) {
      v[i] = v[v.size() - 1];
      v.pop_back();
      return;
    }
  }
}
void decompose(int u, int p, int depth) {
  buildSz(u, p);
  u = findCentroid(u, p, sz[u] >> 1);
  ans[u] = (char)('A' + depth);
  for (auto& v : adj[u]) {
    erase(adj[v], u);
    decompose(v, u, depth + 1);
  }
}
int main() {
  setIO();
  re(N);
  for (int i = 1; i < N; ++i) {
    int u, v;
    re(u, v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  decompose(0, -1, 0);
  for (int i = 0; i < N; ++i) {
    pr(ans[i], ' ');
  }
  return 0;
}
