#include <bits/stdc++.h>
using namespace std;
const int MX = (1 << 20);
int done[MX], n;
vector<int> v[MX];
int best, who, all, sz[MX];
void fuck(int x, int p) {
  int tt = 0;
  for (auto nxt : v[x]) {
    if (nxt == p || done[nxt]) continue;
    fuck(nxt, x);
    tt = max(tt, sz[nxt]);
  }
  tt = max(tt, all - sz[x] - 1);
  if (tt < best) {
    best = tt;
    who = x;
  }
}
void dfs(int x, int p) {
  sz[x] = 1;
  ++all;
  for (auto nxt : v[x]) {
    if (nxt == p || done[nxt]) continue;
    dfs(nxt, x);
    sz[x] += sz[nxt];
  }
}
void solve(int x, int cc) {
  if (cc > 26) {
    puts("Impossible");
    exit(0);
  }
  best = (1 << 20);
  all = 0;
  dfs(x, -1);
  fuck(x, -1);
  done[who] = cc;
  for (auto nxt : v[who]) {
    if (done[nxt]) continue;
    solve(nxt, cc + 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int j = 1; j < n; j++) {
    int a, b;
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  solve(1, 1);
  for (int j = 1; j <= n; j++) cout << char(done[j] + 'A' - 1) << ' ';
}
