#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353LL;
vector<vector<int> > tree;
vector<int> size, dad, isCentroid;
vector<char> ans;
int getSize(int u, int p) {
  size[u] = 1;
  for (auto v : tree[u]) {
    if (v != p && !isCentroid[v]) size[u] += getSize(v, u);
  }
  return size[u];
}
int getCentroid(int u, int p, int n) {
  for (auto v : tree[u]) {
    if (v != p && !isCentroid[v] && size[v] > n / 2)
      return getCentroid(v, u, n);
  }
  return u;
}
bool impossible = 0;
void centroidTree(int u, int p, int lvl) {
  if (lvl == 26) impossible = 1;
  int n = getSize(u, p);
  int centroid = getCentroid(u, p, n);
  ans[centroid - 1] = 'A' + lvl;
  isCentroid[centroid] = 1;
  if (p == -1) p = centroid;
  dad[centroid] = p;
  for (auto v : tree[centroid]) {
    if (!isCentroid[v]) centroidTree(v, centroid, lvl + 1);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int N;
  cin >> N;
  tree.resize(N + 1);
  size.resize(N + 1);
  dad.resize(N + 1);
  isCentroid.resize(N + 1);
  ans.resize(N);
  for (int i = 0, u, v; i < N - 1; i++) {
    cin >> u >> v;
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  centroidTree(1, -1, 0);
  if (impossible)
    cout << "Impossible!\n";
  else {
    for (auto x : ans) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
