#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
const long long N = 2e5 + 5;
long long rand_int(long long l, long long r) {
  static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  return uniform_int_distribution<long long>(l, r)(gen);
}
long long power(long long b, long long e) {
  if (e == 0) return 1;
  if (e % 2)
    return ((b * power((b) * (b), (e - 1) / 2)));
  else
    return power((b) * (b), e / 2);
}
long long modpower(long long b, long long e, long long q) {
  long long MOD = q;
  if (e == 0) return 1;
  if (e % 2)
    return ((b % MOD) * modpower((b % MOD) * (b % MOD), (e - 1) / 2, q)) % MOD;
  else
    return modpower((b % MOD) * (b % MOD), e / 2, q) % MOD;
}
void dpv(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
void dpv(vector<pair<long long, long long> > v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << endl;
  }
}
void dpv(set<long long> v) {
  for (auto i : v) {
    cout << i << " ";
  }
  cout << endl;
}
long long ceil1(long long x, long long y) {
  long long r = x / y;
  if (x % y == 0) {
    return r;
  } else {
    return r + 1;
  }
}
vector<set<long long> > adj(N);
vector<long long> sze(N);
vector<char> ans(N);
long long temp = 0;
void dfs1(long long x, long long p) {
  sze[x] = 1;
  temp++;
  for (auto i : adj[x]) {
    if (i != p) {
      dfs1(i, x);
      sze[x] += sze[i];
    }
  }
}
long long dfs2(long long x, long long p) {
  for (auto i : adj[x]) {
    if (i != p && sze[i] > temp / 2) {
      return dfs2(i, x);
    }
  }
  return x;
}
void decompose(long long x, long long p, long long lvl) {
  temp = 0;
  dfs1(x, x);
  long long centroid = dfs2(x, x);
  ans[centroid] = 'A' + lvl;
  if (p == 0) {
    p = x;
  }
  for (auto i : adj[centroid]) {
    adj[i].erase(centroid);
    decompose(i, centroid, lvl + 1);
  }
  adj[centroid].clear();
}
void oblivious() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    adj[x].insert(y);
    adj[y].insert(x);
  }
  decompose(1, 0, 0);
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    oblivious();
  }
  return 0;
}
