#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 10;
vector<long long> tree[MAXN];
vector<long long> vertex[MAXN];
long long subtree[MAXN];
long long centroid_check[MAXN];
char z[MAXN];
bool check[MAXN];
long long t = 1, w = 0;
void set_subtree(long long v) {
  centroid_check[v] = t;
  subtree[v] = 1;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i]] && centroid_check[vertex[v][i]] != t) {
      set_subtree(vertex[v][i]);
      subtree[v] += subtree[vertex[v][i]];
    }
  }
}
long long get_centroid(long long v) {
  centroid_check[v] = t;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i]] && centroid_check[vertex[v][i]] != t &&
        2 * subtree[vertex[v][i]] > w) {
      return get_centroid(vertex[v][i]);
    }
  }
  return v;
}
void centroid_dfs(long long v) {
  check[v] = true;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i]]) {
      t++;
      set_subtree(vertex[v][i]);
      w = subtree[vertex[v][i]];
      t++;
      long long u = get_centroid(vertex[v][i]);
      tree[v].push_back(u);
      centroid_dfs(u);
    }
  }
}
void dfs(long long v, long long r) {
  z[v] = r + 'A';
  for (long long i = 0; i < tree[v].size(); i++) {
    dfs(tree[v][i], r + 1);
  }
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < (n - 1); i++) {
    long long v, u;
    cin >> v >> u;
    vertex[v].push_back(u);
    vertex[u].push_back(v);
  }
  set_subtree(1);
  w = subtree[1];
  t++;
  long long e = get_centroid(1);
  t++;
  centroid_dfs(e);
  dfs(e, 0);
  for (long long i = 1; i <= n; i++) {
    cout << z[i] << " ";
  }
}
