#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
vector<int> v[N];
int sz[N];
bool vis[N];
int ans[N];
void dfs(int s, int p = 0) {
  sz[s] = 1;
  for (auto i : v[s]) {
    if (i == p || vis[i]) continue;
    dfs(i, s);
    sz[s] += sz[i];
  }
}
int centroid(int s, int root, int p = 0) {
  for (auto i : v[s]) {
    if (i != p && !vis[i] && sz[i] * 2 >= sz[root]) return centroid(i, root, s);
  }
  return s;
}
void decompose(int s, int c) {
  dfs(s);
  int cen = centroid(s, s);
  ans[cen] = c;
  vis[cen] = 1;
  for (auto i : v[cen])
    if (!vis[i]) decompose(i, c + 1);
}
int main() {
  int n;
  scanf("%d", &n);
  int x, y;
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  decompose(1, 0);
  for (int i = 1; i <= n; i++) {
    printf("%c ", 'A' + ans[i]);
  }
  return 0;
}
