#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << "[" << H << "]";
  debug_out(T...);
}
clock_t startTime;
double getCurrentTime() {
  return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
const double eps = 0.00001;
const int MOD = 1e9 + 7;
const int INF = 1000000101;
const long long LLINF = 1223372000000000555;
const int N = 5e5 + 3e2;
const int M = 222;
vector<int> g[N];
int centdep[N];
int centpar[N];
int get_centroid(int v, int par, int n, int &centroid) {
  int size = 1;
  for (int u : g[v]) {
    if (u != par && centdep[u] == -1) size += get_centroid(u, v, n, centroid);
  }
  if (size * 2 >= n && centroid == -1) centroid = v;
  return size;
}
void build_centroid_tree(int v, int par, int dep, int n) {
  int centroid = -1;
  get_centroid(v, -1, n, centroid);
  if (centroid == -1) centroid = v;
  centdep[centroid] = dep;
  centpar[centroid] = par;
  for (int u : g[centroid]) {
    if (u != par && centdep[u] == -1) {
      build_centroid_tree(u, centroid, dep + 1, (n + 1) / 2);
    }
  }
}
void solve(int TC) {
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  fill(centdep + 1, centdep + n + 1, -1);
  build_centroid_tree(1, -1, 1, n);
  for (int i = 1; i <= n; i++) {
    cout << char(centdep[i] + 'A' - 1) << ' ';
  }
}
int main() {
  startTime = clock();
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios_base::sync_with_stdio(false);
  bool llololcal = false;
  int TC = 1;
  for (int test = 1; test <= TC; test++) {
    solve(test);
  }
  if (llololcal)
    cerr << endl << "Time: " << int(getCurrentTime() * 1000) << " ms" << endl;
  return 0;
}
