#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > matmul(vector<vector<long long> > &a,
                                  vector<vector<long long> > &b) {
  int i, j, k, n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      long long temp = 0;
      for (k = 0; k < n; k++)
        temp = (temp + a[i][k] * b[k][j]) % (1000000007LL);
      ans[i][j] = temp;
    }
  return ans;
}
vector<vector<long long> > matpwr(vector<vector<long long> > &a, long long p) {
  int n = a.size();
  vector<vector<long long> > ans(n, vector<long long>(n));
  for (int i = 0; i < n; i++) ans[i][i] = 1;
  while (p) {
    if (p & 1) ans = matmul(ans, a);
    a = matmul(a, a);
    p >>= 1;
  }
  return ans;
}
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long invMod(long long n, long long mod = (1000000007LL)) {
  return pwr(n, mod - 2, mod);
}
int n, depth[250004], par[20][250004], subsize[250004];
set<int> adj[250004];
void dfs(int v, int p) {
  par[0][v] = p;
  depth[v] = (p == -1 ? 0 : (1 + depth[p]));
  for (set<int>::iterator it = adj[v].begin(); it != adj[v].end(); it++) {
    int vv = (*it);
    if (vv == p) continue;
    dfs(vv, v);
  }
}
int LCA(int a, int b) {
  if (depth[a] < depth[b]) swap(a, b);
  int diff = depth[a] - depth[b];
  for (int i = 0; i < 20; i++)
    if ((diff >> i) & 1) a = par[i][a];
  if (a == b) return a;
  for (int i = 19; i >= 0; i--)
    if (par[i][a] != par[i][b]) {
      a = par[i][a];
      b = par[i][b];
    }
  if (a == b) return a;
  return par[0][a];
}
void dfs1(int v, int par) {
  subsize[v] = 1;
  for (set<int>::iterator it = adj[v].begin(); it != adj[v].end(); it++) {
    int vv = (*it);
    if (vv == par) continue;
    dfs1(vv, v);
    subsize[v] += subsize[vv];
  }
}
int dfs2(int v, int par, int tot) {
  for (set<int>::iterator it = adj[v].begin(); it != adj[v].end(); it++) {
    int vv = (*it);
    if (vv == par) continue;
    if (subsize[vv] > tot / 2) return dfs2(vv, v, tot);
  }
  return v;
}
char ans[100004];
void decompose(int v, int par, int d) {
  dfs1(v, -1);
  int centroid = dfs2(v, -1, subsize[v]);
  ans[centroid] = 'A' + d;
  long long s = 0, c = 0;
  for (set<int>::iterator it = adj[centroid].begin(); it != adj[centroid].end();
       it++) {
    adj[(*it)].erase(centroid);
    decompose((*it), centroid, d + 1);
  }
  adj[centroid].clear();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  int e = n - 1;
  while (e--) {
    int a, b;
    cin >> a >> b;
    adj[a].insert(b);
    adj[b].insert(a);
  }
  memset(par, -1, sizeof(par));
  dfs(1, -1);
  for (int j = 0; j < 20; j++)
    for (int i = 1; i <= n; i++)
      if (par[j][i] != -1) par[j + 1][i] = par[j][par[j][i]];
  decompose(1, -1, 0);
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
