#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n;
int sz[N];
int ans[N];
bool vis[N];
vector<int> Tree[N];
int getSize(int u, int p) {
  sz[u] = 1;
  for (int v : Tree[u])
    if (!vis[v] && v != p) sz[u] += getSize(v, u);
  return sz[u];
}
void getCentroid(int u, int p, int level, int compSz) {
  for (int v : Tree[u])
    if (v != p && !vis[v] && sz[v] >= compSz / 2) {
      getCentroid(v, u, level, compSz);
      return;
    }
  vis[u] = true;
  ans[u] = level;
  for (int v : Tree[u])
    if (!vis[v]) {
      getSize(v, 0);
      getCentroid(v, 0, level + 1, sz[v]);
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    Tree[u].push_back(v);
    Tree[v].push_back(u);
  }
  getSize(1, 0);
  getCentroid(1, 0, 0, sz[1]);
  for (int i = 1; i <= n; i++) printf("%c ", char(ans[i] + 'A'));
  puts("");
  return 0;
}
