#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1073741824")
#pragma warning(disable : 4996)
using namespace std;
const int MAXN = 1e5 + 100, D = 26;
vector<int> v[MAXN];
int col[MAXN], ar[MAXN][D];
void dfs(int node, int p) {
  for (int to : v[node]) {
    if (to != p) {
      dfs(to, node);
      if (ar[to][0] == -1) {
        ar[node][0] = -1;
        return;
      }
      for (int i = 0; i < D; i++) ar[node][i] += ar[to][i];
    }
  }
  int i = D - 1;
  for (; i >= 0; i--) {
    if (ar[node][i] > 1) break;
  }
  i++;
  while (ar[node][i]) i++;
  if (i >= D)
    ar[node][0] = -1;
  else {
    ar[node][i]++;
    col[node] = i;
    i--;
    for (; i >= 0; i--) ar[node][i] = 0;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(0, 0);
  if (ar[0][0] == -1)
    printf("Impossible!");
  else {
    for (int i = 0; i < n; i++) {
      printf("%c ", 'Z' - col[i]);
    }
  }
  return 0;
}
