#include <bits/stdc++.h>
using namespace std;
int n, s[1000000];
vector<int> adj[1000000];
bool mk[1000000];
char ans[1000000];
int subsize(int v, int par) {
  s[v] = 1;
  for (int i = 0; i < adj[v].size(); i++)
    if (adj[v][i] != par && !mk[adj[v][i]]) s[v] += subsize(adj[v][i], v);
  return s[v];
}
int findcen(int v, int par, int sz) {
  int cen = v;
  for (auto u : adj[v])
    if (s[u] > sz / 2 && u != par && !mk[u]) cen = findcen(u, v, sz);
  return cen;
}
void solve(int v, char assign) {
  subsize(v, v);
  int cen = findcen(v, v, s[v]);
  ans[cen] = assign;
  mk[cen] = true;
  for (auto u : adj[cen])
    if (!mk[u]) solve(u, assign + 1);
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b), adj[b].push_back(a);
  }
  solve(1, 'A');
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
