#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
int colors[100000];
bool hasColor[100000];
int curN;
int subtreeSizes[100000];
int color;
int n;
int tmpHeavy;
int dfs(int curNode, int prevNode) {
  int i;
  int s = 0;
  for (i = 0; i < adj[curNode].size(); i++) {
    int neighbor = adj[curNode][i];
    if (neighbor != prevNode && !hasColor[neighbor]) {
      s += dfs(neighbor, curNode);
    }
  }
  subtreeSizes[curNode] = s + 1;
  return subtreeSizes[curNode];
}
int find_centroid(int curNode, int prevNode) {
  int i;
  bool isCentroid = true;
  int neighbor;
  for (i = 0; i < adj[curNode].size(); i++) {
    neighbor = adj[curNode][i];
    if (subtreeSizes[neighbor] > subtreeSizes[curNode]) continue;
    if (2 * subtreeSizes[neighbor] > curN) {
      isCentroid = false;
      break;
    }
  }
  if (isCentroid) {
    tmpHeavy = prevNode;
    return curNode;
  }
  return find_centroid(neighbor, curNode);
}
void decompose(int curNode, int prevHeavyNode) {
  if (curNode == prevHeavyNode || curNode == 0)
    curN = dfs(curNode, -1);
  else
    curN = subtreeSizes[curNode];
  int centroid = find_centroid(curNode, -1);
  prevHeavyNode = tmpHeavy;
  hasColor[centroid] = true;
  colors[centroid] = color;
  int i;
  color++;
  for (i = 0; i < adj[centroid].size(); i++) {
    int neighbor = adj[centroid][i];
    if (!hasColor[neighbor]) {
      decompose(neighbor, prevHeavyNode);
    }
  }
  color--;
}
void centroid_decomposition() {
  color = 0;
  decompose(0, -1);
}
void init() {
  adj.resize(n);
  curN = -1;
}
int main() {
  scanf("%d", &n);
  init();
  int i;
  for (i = 0; i < n - 1; i++) {
    int from, to;
    scanf("%d %d", &from, &to);
    from--;
    to--;
    adj[from].push_back(to);
    adj[to].push_back(from);
  }
  centroid_decomposition();
  char x = 'A';
  for (i = 0; i < n; i++) {
    printf("%c ", (char)(colors[i] + x));
  }
  printf("\n");
  return 0;
}
