#include <bits/stdc++.h>
using namespace std;
int n;
set<int> adj[100005];
int par[100005], sz[100005];
set<int> children[100005];
char ans[100005];
int size = 0;
void init() { return; }
void dfs1(int src, int p) {
  sz[src] = 1;
  size++;
  for (auto it : adj[src]) {
    if (it != p) {
      dfs1(it, src);
      sz[src] += sz[it];
    }
  }
  return;
}
int dfs2(int src, int p) {
  for (auto it : adj[src]) {
    if (it != p && sz[it] > size / 2) {
      return dfs2(it, src);
    }
  }
  return src;
}
void decompose(int src, int p) {
  size = 0;
  dfs1(src, -1);
  int centroid = dfs2(src, -1);
  if (p == -1) p = centroid;
  par[centroid] = p;
  if (par[centroid] != centroid) children[par[centroid]].insert(centroid);
  for (auto it : adj[centroid]) {
    adj[it].erase(centroid);
    decompose(it, centroid);
  }
  adj[centroid].clear();
  return;
}
bool dfs(int src) {
  bool sol = true;
  for (auto it : children[src]) {
    ans[it] = (char)(ans[src] + 1);
    if (ans[it] > 'Z') return false;
    sol = sol & dfs(it);
  }
  return sol;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  init();
  cin >> n;
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    adj[a].insert(b);
    adj[b].insert(a);
  }
  decompose(0, -1);
  int centroid = 0;
  while (par[centroid] != centroid) {
    centroid = par[centroid];
  }
  ans[centroid] = 'A';
  bool sol = dfs(centroid);
  if (!sol)
    cout << "Impossible!"
         << "\n";
  else {
    for (int i = 0; i < n; i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
