#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> tree, ctree;
vector<long long> sz;
vector<bool> vis;
long long root;
void findSize(long long second, long long p) {
  sz[second] = 1;
  for (auto v : tree[second]) {
    if (!vis[v] && v != p) {
      findSize(v, second);
      sz[second] += sz[v];
    }
  }
}
long long findCentroid(long long second, long long p, long long n) {
  for (auto v : tree[second]) {
    if (!vis[v] && v != p && sz[v] > n / 2) {
      return findCentroid(v, second, n);
    }
  }
  return second;
}
long long centroidDecomposition(long long second, long long p) {
  findSize(second, p);
  long long u, ct = findCentroid(second, p, sz[second]);
  vis[ct] = true;
  if (p == 0) root = ct;
  for (auto v : tree[ct]) {
    if (!vis[v]) {
      u = centroidDecomposition(v, ct);
      ctree[ct].push_back(u);
    }
  }
  return ct;
}
void process(long long n) {
  ctree.clear();
  ctree.resize(n + 1);
  sz.clear();
  sz.resize(n + 1);
  vis.clear();
  vis.resize(n + 1);
  centroidDecomposition(1, 0);
}
vector<char> assign;
void ass(long long second, long long p, long long d) {
  if (d >= 26) {
    assign[0] = '!';
    return;
  }
  assign[second] = (char)('A' + d);
  for (auto v : ctree[second]) {
    if (v != p) {
      ass(v, second, d + 1);
    }
  }
}
void solve() {
  long long n, x, y;
  cin >> n;
  tree.clear();
  tree.resize(n + 1);
  for (long long i = 0; i < n - 1; ++i) {
    cin >> x >> y;
    tree[x].push_back(y);
    tree[y].push_back(x);
  }
  process(n);
  assign.clear();
  assign.resize(n + 1);
  ass(root, 0, 0);
  if (assign[0] != '!') {
    for (long long i = 1; i <= n; ++i) cout << assign[i] << " ";
    cout << "\n";
  } else {
    cout << "Impossible!"
         << "\n";
  }
  return;
}
signed main() {
  solve();
  return 0;
}
