#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int N, ar[MAXN], child[MAXN], sumnode;
vector<int> way[MAXN];
char ans[MAXN];
bool used[MAXN];
int findsize(int node, int dad) {
  child[node] = 1;
  for (int i = 0; i < (int)way[node].size(); i++)
    if (way[node][i] != dad and !used[way[node][i]])
      child[node] += findsize(way[node][i], node);
  return child[node];
}
int findcenter(int node) {
  int mxchild = sumnode - child[node], ret = -1;
  for (int i = 0, tmp; i < (int)way[node].size(); i++)
    if (child[way[node][i]] < child[node]) {
      mxchild = max(mxchild, child[way[node][i]]);
      tmp = findcenter(way[node][i]);
      if (tmp != -1) ret = tmp;
    }
  if (mxchild <= sumnode >> 1) return node;
  return ret;
}
void dfs(int node, int rank) {
  if (rank > 25) {
    printf("Impossible!");
    exit(0);
  }
  sumnode = findsize(node, 0);
  int center = findcenter(node);
  ans[center] = 'A' + rank;
  used[center] = 1;
  for (int i = 0; i < (int)way[center].size(); i++)
    if (!used[way[center][i]]) dfs(way[center][i], rank + 1);
}
int main() {
  scanf("%d", &N);
  for (int i = 1, a, b; i < N; i++) {
    scanf("%d%d", &a, &b);
    way[a].push_back(b);
    way[b].push_back(a);
  }
  dfs(1, 0);
  for (int i = 1; i <= N; i++) printf("%c ", ans[i]);
  return 0;
}
