#include <bits/stdc++.h>
using namespace std;
const int N = 100005, LOGN = 20;
int sz[N];
vector<int> adj[N];
bool done[N];
char rnk[N];
int n;
bool ok;
int setup(int u, int p) {
  sz[u] = 1;
  for (auto it : adj[u]) {
    if (it == p || done[it]) continue;
    sz[u] += setup(it, u);
  }
  return sz[u];
}
int getCentroid(int u, int p, int n) {
  for (auto it : adj[u]) {
    if (it == p || done[it]) continue;
    if (sz[it] > (n / 2)) return getCentroid(it, u, n);
  }
  return u;
}
void decompose(int u, char c) {
  setup(u, u);
  int centroid = getCentroid(u, u, sz[u]);
  rnk[centroid] = c;
  done[centroid] = 1;
  for (auto it : adj[centroid])
    if (!done[it]) {
      if (c == 'Z') ok = 0;
      decompose(it, c + 1);
    }
}
int main() {
  ok = 1;
  int x, y;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  decompose(1, 'A');
  if (ok) {
    for (int i = 1; i <= n; i++) printf("%c ", rnk[i]);
  } else
    printf("Impossible!");
  printf("\n");
  return 0;
}
