#include <bits/stdc++.h>
using namespace std;
int n, sub[100001] = {}, ans[100001] = {};
vector<vector<int> > adj;
void computeSub(int u, int p) {
  sub[u] = 1;
  for (auto v : adj[u]) {
    if (ans[v] == -1 && v != p) {
      computeSub(v, u);
      sub[u] += sub[v];
    }
  }
}
int getCentroid(int u, int p, int sz) {
  for (auto v : adj[u]) {
    if (v != p && ans[v] == -1 && sub[v] > sz / 2) {
      return getCentroid(v, u, sz);
    }
  }
  return u;
}
void buildCentroid(int u, int d) {
  computeSub(u, -1);
  int c = getCentroid(u, -1, sub[u]);
  ans[c] = d;
  for (auto v : adj[c]) {
    if (ans[v] == -1) buildCentroid(v, d + 1);
  }
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    ans[i] = -1;
    adj.push_back(vector<int>());
  }
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u - 1].push_back(v - 1);
    adj[v - 1].push_back(u - 1);
  }
  buildCentroid(0, 0);
  for (int i = 0; i < n; i++) {
    cout << (char)(ans[i] + 'A');
    if (i < n - 1) cout << " ";
  }
  cout << "\n";
  return 0;
}
