#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 10;
vector<long long> graph[MAXN];
long long res[MAXN], sz[MAXN];
bool used[MAXN];
void subsz(long long u, long long p) {
  sz[u] = 1;
  for (auto v : graph[u]) {
    if (v == p || used[v]) continue;
    subsz(v, u);
    sz[u] += sz[v];
  }
}
long long centroid(long long u, long long p, long long n) {
  for (auto v : graph[u]) {
    if (v == p || used[v]) continue;
    if (2 * sz[v] > n) return centroid(v, u, n);
  }
  return u;
}
void decompose(long long u, long long n) {
  subsz(u, u);
  long long c = centroid(u, u, sz[u]);
  res[c] = n, used[c] = 1;
  for (auto v : graph[c]) {
    if (!used[v]) decompose(v, n + 1);
  }
}
void solve() {
  long long n;
  cin >> n;
  for (long long i = 1; i < n; ++i) {
    long long u, v;
    cin >> u >> v;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  decompose(1, 0);
  for (long long i = 1; i <= n; ++i) cout << (char)(res[i] + 'A') << ' ';
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
