#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T abs(T x) {
  return x < 0 ? -x : x;
}
const int MAXN = 120 * 1000;
vector<int> adj[MAXN];
int color[MAXN], h[MAXN], max_ch[MAXN];
bool used[MAXN];
vector<int> cur_v;
void dfs(int v) {
  used[v] = true;
  cur_v.push_back(v);
  h[v] = 1;
  max_ch[v] = 0;
  for (int i = 0; i < ((int)(adj[v]).size()); ++i) {
    int u = adj[v][i];
    if (!used[u] && color[u] == -1) {
      dfs(u);
      h[v] += h[u];
      max_ch[v] = max(max_ch[v], h[u]);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int v1, v2;
  for (int i = 0; i < n - 1; ++i) {
    cin >> v1 >> v2;
    v1--, v2--;
    adj[v1].push_back(v2);
    adj[v2].push_back(v1);
  }
  for (int i = 0; i < n; ++i) {
    color[i] = -1;
  }
  for (int i = 0; i < 26; ++i) {
    for (int j = 0; j < n; ++j) {
      used[j] = false;
    }
    for (int j = 0; j < n; ++j) {
      if (!used[j] && color[j] == -1) {
        cur_v.clear();
        dfs(j);
        int cntr = -1;
        for (int k = 0; k < ((int)(cur_v).size()); ++k) {
          int u = cur_v[k];
          if (2 * max_ch[u] <= h[j] && 2 * (h[j] - h[u]) <= h[j]) {
            cntr = u;
          }
        }
        color[cntr] = i;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << (char)(color[i] + 'A') << " ";
  }
  cout << endl;
  return 0;
}
