#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX / 2;
vector<vector<int>> adj;
vector<int> sz;
vector<bool> rm;
vector<char> label;
int getSz(int node, int parent = -1) {
  sz[node] = 1;
  for (int x : adj[node]) {
    if (x != parent and !rm[x]) sz[node] += getSz(x, node);
  }
  return sz[node];
}
int getCentroid(int node, int wsz, int parent = 0) {
  for (int x : adj[node]) {
    if (x != parent and !rm[x] and sz[x] > wsz)
      return getCentroid(x, wsz, node);
  }
  return node;
}
void centroid(int n, char ch = 'A') {
  int wsz = getSz(n) / 2;
  int c = getCentroid(n, wsz);
  rm[c] = true;
  label[c] = ch;
  for (int x : adj[c]) {
    if (!rm[x]) centroid(x, (char)(ch + 1));
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, u, v;
  cin >> n;
  adj.resize(n + 1);
  sz.resize(n + 1);
  rm.resize(n + 1);
  label.resize(n + 1, 'A');
  for (int i = 1; i < n; ++i) {
    cin >> u >> v;
    adj[u].emplace_back(v);
    adj[v].emplace_back(u);
  }
  centroid(1);
  for (int i = 1; i <= n; ++i) cout << label[i] << ' ';
  return 0;
}
