#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > adj(100001);
vector<int> vis(100001, 0);
vector<vector<int> > lgntree(100001);
vector<int> treevis(100001, 0);
vector<int> size(100001, 1);
int n, k;
int flag;
void assign(int x, vector<char> &ans, char c, int col) {
  if (c < 'A' || flag == 0) {
    flag = 0;
    return;
  }
  vis[x] = col;
  ans[x] = c;
  for (__typeof(lgntree[x].begin()) it = lgntree[x].begin();
       it != lgntree[x].end(); it++) {
    if (vis[*it] != col) assign(*it, ans, c - 1, col);
  }
}
void dfs_size(int x, int col, vector<int> &size) {
  size[x] = 1;
  vis[x] = col;
  for (__typeof(adj[x].begin()) it = adj[x].begin(); it != adj[x].end(); it++) {
    if (vis[*it] != col && treevis[*it] == 0) {
      dfs_size(*it, col, size);
      size[x] += size[*it];
    }
  }
}
int findcnt(int x, int mx, vector<int> &size, int k) {
  vis[x] = k;
  for (__typeof(adj[x].begin()) it = adj[x].begin(); it != adj[x].end(); it++) {
    if (size[*it] > mx && vis[*it] != k && treevis[*it] == 0)
      return findcnt(*it, mx, size, k);
  }
  return x;
}
void dfs(int c, int x, int mx) {
  dfs_size(x, ++k, size);
  int zz = findcnt(x, mx, size, ++k);
  lgntree[c].push_back(zz);
  lgntree[zz].push_back(c);
  treevis[zz] = 1;
  for (__typeof(adj[zz].begin()) it = adj[zz].begin(); it != adj[zz].end();
       it++) {
    if (treevis[*it] == 0) dfs(zz, *it, mx / 2);
  }
}
int main() {
  scanf("%d", &n);
  k = 0;
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  treevis[0] = 1;
  dfs(0, 1, n / 2);
  flag = 1;
  vector<char> ans(n + 1);
  assign(lgntree[0][0], ans, 'Z', ++k);
  if (flag == 0)
    printf("Impossible!");
  else {
    for (int i = 1; i <= n; i++) cout << (char)('A' + 'Z' - ans[i]) << " ";
  }
  printf("\n");
}
