#include <bits/stdc++.h>
using namespace std;
const int INF = 123456789;
const int MAXN = 1e5 + 5;
vector<set<int>> adj;
struct CentroidDecomposition {
  vector<set<int>> tree;
  vector<int> par, st, ans;
  CentroidDecomposition(vector<set<int>> &t) : tree(t) {
    int n = tree.size();
    par.resize(n);
    st.resize(n);
    ans = vector<int>(n, -1);
    decompose(1, -1, 0);
  }
  int subTreeSz(int u, int p) {
    st[u] = 1;
    for (auto v : tree[u]) {
      if (v != p) st[u] += subTreeSz(v, u);
    }
    return st[u];
  }
  int getCentroid(int u, int p, int sz) {
    for (auto v : tree[u]) {
      if (v != p && st[v] > sz / 2) return getCentroid(v, u, sz);
    }
    return u;
  }
  void decompose(int u, int p, int level) {
    int sz = subTreeSz(u, p);
    int centroid = getCentroid(u, u, sz);
    if (p == -1) p = centroid;
    par[centroid] = p;
    ans[centroid] = level;
    for (auto v : tree[centroid]) {
      tree[v].erase(centroid);
      decompose(v, centroid, level + 1);
    }
    tree[centroid].clear();
  }
  void print(int n) {
    for (int i = 1; i <= n; ++i) {
      if (ans[i] != -1)
        cout << char('A' + ans[i]) << ' ';
      else
        cout << 'Z' << ' ';
    }
  }
};
int main() {
  int n;
  scanf("%d", &n);
  adj.resize(n + 1);
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    adj[a].insert(b);
    adj[b].insert(a);
  }
  CentroidDecomposition cd(adj);
  cd.print(n);
  return 0;
}
