#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200100;
vector<int> g[MAXN];
int cnt[MAXN];
int sol[MAXN];
void dfs1(int u, int p = 0) {
  cnt[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (sol[v] || v == p) {
      continue;
    }
    dfs1(v, u);
    cnt[u] += cnt[v];
  }
}
void solve(int u, int p, int r, int sz, int t) {
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (sol[v] || v == p) {
      continue;
    }
    if (cnt[v] > sz / 2) {
      solve(v, u, r, sz, t);
      return;
    }
  }
  sol[u] = ++t;
  if (u != r) {
    dfs1(r);
    solve(r, 0, r, cnt[r], t);
  }
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (sol[v] || v == p) {
      continue;
    }
    solve(v, 0, v, cnt[v], t);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs1(1);
  solve(1, 0, 1, n, 0);
  for (int i = 1; i <= n; i++) {
    sol[i]--;
    if (i > 1) {
      cout << ' ';
    }
    cout << (char)('A' + sol[i]);
  }
  cout << '\n';
}
