#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
vector<vector<int>> E;
vector<int> subtree_size;
vector<bool> used;
int calc_subtree_size(int now, int pre) {
  int sum = 1;
  for (int nxt : E[now]) {
    if (nxt == pre || used[nxt]) continue;
    sum += calc_subtree_size(nxt, now);
  }
  return subtree_size[now] = sum;
}
pair<int, int> search_centroid(int now, int pre, int total) {
  pair<int, int> ret = {INF, -1};
  int max_sub = total - subtree_size[now];
  for (int nxt : E[now]) {
    if (nxt == pre || used[nxt]) continue;
    ret = min(ret, search_centroid(nxt, now, total));
    max_sub = max(max_sub, subtree_size[nxt]);
  }
  return min(ret, make_pair(max_sub, now));
}
bool dfs(int root, char c, vector<char> &ans) {
  if (c > 'Z') return false;
  bool ret = true;
  int total = calc_subtree_size(root, -1);
  int centroid = search_centroid(root, -1, total).second;
  ans[centroid] = c;
  used[centroid] = true;
  for (int nxt : E[centroid]) {
    if (used[nxt]) continue;
    ret &= dfs(nxt, c + 1, ans);
  }
  return ret;
}
void init(int N) {
  E.resize(N);
  used.resize(N, false);
  subtree_size.resize(N);
}
void input(int N) {
  for (long long(i) = 0; (i) < (N - 1); (i)++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    E[a].push_back(b);
    E[b].push_back(a);
  }
}
int main() {
  int N;
  cin >> N;
  init(N);
  input(N);
  vector<char> ans(N);
  if (dfs(0, 'A', ans) == false) {
    cout << "Impossible!" << endl;
  } else {
    for (long long(i) = 0; (i) < (N - 1); (i)++) {
      cout << ans[i] << " ";
    }
    cout << ans.back() << endl;
  }
  return 0;
}
