#include <bits/stdc++.h>
using namespace std;
long long mod_v(long long num) {
  if (num >= 0)
    return (num % 1000000007);
  else
    return (num % 1000000007 + 1000000007) % 1000000007;
}
long long bigmod(long long b, long long p, long long m) {
  long long res = 1 % m, x = b % m;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
vector<int> adj[100005];
vector<int> new_adj[100005];
bool vis[100005];
int dis[100005];
int start;
void dfs(int s, int p) {
  dis[s] = 1;
  int len = adj[s].size();
  for (int i = 0, ns; i < len; i++) {
    ns = adj[s][i];
    if (ns == p) continue;
    if (vis[ns] == 1) continue;
    dfs(ns, s);
    dis[s] += dis[ns];
  }
}
int centroid(int s, int p, int target_size) {
  int len = adj[s].size();
  for (int i = 0, ns; i < len; i++) {
    ns = adj[s][i];
    if (ns == p) continue;
    if (vis[ns] == 1) continue;
    if (dis[ns] * 2 > target_size) {
      return centroid(ns, s, target_size);
    }
  }
  return s;
}
int getCenter(int s) {
  dfs(s, 0);
  return centroid(s, 0, dis[s]);
}
void centroidTree(int s, int p) {
  int cc = getCenter(s);
  vis[cc] = 1;
  if (p == 0) {
    start = cc;
  } else {
    new_adj[p].push_back(cc);
    new_adj[cc].push_back(p);
  }
  int len = adj[cc].size();
  for (int i = 0, ns; i < len; i++) {
    ns = adj[cc][i];
    if (vis[ns] == 1) continue;
    centroidTree(ns, cc);
  }
}
char ans[100005];
void level(int s, int p, char ch) {
  ans[s] = ch;
  int len = new_adj[s].size();
  for (int i = 0, ns; i < len; i++) {
    ns = new_adj[s][i];
    if (ns == p) continue;
    level(ns, s, ch + 1);
  }
}
int main() {
  int n, u, v;
  scanf("%d", &n);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  centroidTree(1, 0);
  level(start, 0, 'A');
  for (int i = 1; i <= n; i++) printf("%c ", ans[i]);
  cout << "\n";
  return 0;
}
