#include <bits/stdc++.h>
using namespace std;
int N;
set<int> adj[100001];
int ans[100001];
int subsize[100001];
bool dead[100001];
int dfs(int node, int parent) {
  subsize[node] = 1;
  for (auto v : adj[node]) {
    if (!dead[v] && v != parent) subsize[node] += dfs(v, node);
  }
  return subsize[node];
}
int dfs(int node, int parent, int size) {
  for (auto v : adj[node]) {
    if (!dead[v] && v != parent && subsize[v] > size / 2)
      return dfs(v, node, size);
  }
  return node;
}
void build(int node, int prev, int depth) {
  int size = dfs(node, prev);
  int centroid = dfs(node, prev, size);
  ans[centroid] = depth;
  dead[centroid] = true;
  for (auto v : adj[centroid]) {
    if (!dead[v]) build(v, centroid, depth + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i < N; i++) {
    int X, Y;
    cin >> X >> Y;
    adj[X].insert(Y);
    adj[Y].insert(X);
  }
  build(1, -1, 0);
  for (int i = 1; i <= N; i++) cout << (char)(ans[i] + 'A') << ' ';
  cout << '\n';
  return 0;
}
