#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int maxn = 1e5 + 5;
int n;
vector<int> G[maxn];
int val[maxn], sz[maxn];
bool vis[maxn];
void dfs_sz(int u, int fa) {
  sz[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v == fa || val[v]) continue;
    dfs_sz(v, u);
    sz[u] += sz[v];
  }
}
void dfs_ce(int u, int fa, int &cetroid, int &maxcnt, int allcnt) {
  int tmp = allcnt - sz[u];
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (v == fa || val[v]) continue;
    dfs_ce(v, u, cetroid, maxcnt, allcnt);
    tmp = max(tmp, sz[v]);
  }
  if (tmp < maxcnt) {
    cetroid = u, maxcnt = tmp;
  }
}
void dfs(int u, int deep) {
  int cetroid, maxcnt = maxn * 100;
  dfs_sz(u, -1);
  dfs_ce(u, -1, cetroid, maxcnt, sz[u]);
  val[cetroid] = deep;
  for (int i = 0; i < G[cetroid].size(); i++) {
    int v = G[cetroid][i];
    if (val[v]) continue;
    dfs(v, deep + 1);
  }
}
bool solve() {
  dfs(1, 1);
  for (int i = 1; i <= n; i++) {
    if (val[i] > 26) return false;
  }
  for (int i = 1; i <= n; i++) {
    val[i]--;
    printf("%c ", val[i] + 'A');
  }
  cout << endl;
  return true;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v), G[v].push_back(u);
  }
  if (!solve()) puts("Impossible!");
  return 0;
}
