#include <bits/stdc++.h>
using namespace std;
vector<int> g[100000 + 10], V1, V2;
int vis[100000 + 10], siz[100000 + 10], dp[100000 + 10];
int n;
int max(int a, int b) { return a > b ? a : b; }
void dfs(int u, int pre) {
  int son = 0;
  siz[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == pre || vis[v]) continue;
    dfs(v, u);
    siz[u] += siz[v];
    if (siz[v] > son) son = siz[v];
  }
  V1.push_back(son);
  V2.push_back(u);
}
int getRoot(int u) {
  V1.clear();
  V2.clear();
  dfs(u, -1);
  int tot = V1.size();
  int ans;
  int min = 100000000;
  for (int i = 0; i < tot; i++) {
    int temp = max(V1[i], tot - V1[i]);
    if (temp < min) {
      min = temp;
      ans = V2[i];
    }
  }
  return ans;
}
void solve(int u, int d) {
  u = getRoot(u);
  dp[u] = d;
  vis[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (vis[v]) continue;
    solve(v, d + 1);
  }
}
int main() {
  scanf("%d", &n);
  memset(vis, 0, sizeof(vis));
  memset(siz, 0, sizeof(siz));
  int a, b;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  solve(1, 0);
  for (int i = 1; i <= n; i++) {
    if (i == n)
      printf("%c\n", 'A' + dp[i]);
    else
      printf("%c ", 'A' + dp[i]);
  }
  return 0;
}
