#include <bits/stdc++.h>
using namespace std;
vector<int> mp[100050];
int vis[100050], n;
int sz[100050];
int rt, tot;
void dfs1(int nid, int fid) {
  sz[nid] = 1;
  int len = mp[nid].size();
  for (int i = 0; i < len; i++) {
    int pos = mp[nid][i];
    if (pos == fid || vis[pos] != 0) continue;
    dfs1(pos, nid);
    sz[nid] += sz[pos];
  }
}
void getrt(int nid, int fid) {
  int len = mp[nid].size();
  int cnt = 0;
  sz[nid] = 1;
  for (int i = 0; i < len; i++) {
    int pos = mp[nid][i];
    if (pos == fid || vis[pos] != 0) continue;
    getrt(pos, nid);
    sz[nid] += sz[pos];
    if (sz[pos] > tot / 2) cnt++;
  }
  if (cnt == 0) rt = nid;
}
void work(int nid, int num) {
  dfs1(nid, 0);
  rt = 0;
  tot = sz[nid];
  getrt(nid, 0);
  int root = rt;
  vis[root] = num + 1;
  int len = mp[root].size();
  for (int i = 0; i < len; i++) {
    int pos = mp[root][i];
    if (vis[pos] != 0) continue;
    work(pos, num + 1);
  }
}
int main() {
  memset(vis, 0, sizeof(vis));
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    mp[a].push_back(b);
    mp[b].push_back(a);
  }
  work(1, 0);
  for (int i = 1; i <= n; i++) printf("%c ", vis[i] + 'A' - 1);
  return 0;
}
