#include <bits/stdc++.h>
using namespace std;
set<int> g[100005];
int cd_father[100005];
int subSize[100005];
int cd_depth[100005];
int n;
int maxDepth;
int get_size(int cur, int p) {
  subSize[cur] = 1;
  for (int u : g[cur])
    if (u != p) subSize[cur] += get_size(u, cur);
  return subSize[cur];
}
int get_centroid(int cur, int p, int n) {
  for (int u : g[cur])
    if (u != p && subSize[u] > n / 2) return get_centroid(u, cur, n);
  return cur;
}
void centroid_decomposition(int cur, int p, int depth) {
  int n = get_size(cur, p);
  int centroid = get_centroid(cur, p, n);
  cd_father[centroid] = p;
  cd_depth[centroid] = depth;
  maxDepth = max(depth, maxDepth);
  for (int u : g[centroid])
    if (u != p) {
      g[u].erase(centroid);
      centroid_decomposition(u, centroid, depth + 1);
    }
  g[centroid].clear();
}
int main() {
  cin >> n;
  int u, v;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    g[u].insert(v);
    g[v].insert(u);
  }
  centroid_decomposition(1, -1, 0);
  if (maxDepth >= 26) {
    cout << "Impossible!" << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) cout << (char)(cd_depth[i] + 'A') << ' ';
  cout << endl;
  return 0;
}
