#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265359;
const int N = 1e5 + 5;
const int MOD = 1e9 + 7;
vector<int> g[N];
char ans[N];
int c = -1, mx = -1;
int get(int v, int p) {
  int ret = 1;
  for (auto &it : g[v]) {
    if (!ans[it] && it != p) ret += get(it, v);
  }
  return ret;
}
int dfs(int v, int p, int sz) {
  int ret = 1, mn = INT_MAX;
  for (auto &it : g[v]) {
    if (it != p && !ans[it]) {
      int k = dfs(it, v, sz);
      mn = min(mn, k);
      ret += k;
    }
  }
  if (mn == INT_MAX) mn = 0;
  mn = min(mn, sz - ret);
  if (mn > c) c = mn, mx = v;
  return ret;
}
void mk(int v, int d) {
  ans[v] = 'A' + d;
  for (auto &it : g[v]) {
    if (!ans[it]) {
      c = -1, mx = -1;
      dfs(it, v, get(it, v));
      if (mx == -1) continue;
      mk(mx, d + 1);
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  get(0, 0);
  dfs(0, 0, n);
  mk(mx, 0);
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
