#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,mmx,avx,avx2")
using namespace std;
const int MAXN = 1e5 + 5;
unordered_set<int> e[MAXN];
char r[MAXN];
int p[MAXN];
int n;
bool t[MAXN];
vector<int> v;
void get(int k, int p) {
  for (int i : e[k]) {
    if (i == p) {
      continue;
    }
    get(i, k);
  }
  v.push_back(k);
}
int getcenter(int i) {
  queue<int> q;
  v.clear();
  get(i, -1);
  for (int i : v) {
    p[i] = e[i].size();
    if (p[i] == 1) {
      q.push(i);
    }
  }
  int k = i;
  while (q.size()) {
    if (t[q.front()]) {
      q.pop();
      continue;
    }
    k = q.front();
    q.pop();
    for (int i : e[k]) {
      p[i]--;
      if (p[i] == 1) {
        q.push(i);
      }
    }
  }
  return k;
}
bool dfs(int i) {
  if (r[i] > 'Z') {
    return false;
  }
  t[i] = true;
  for (int j : e[i]) {
    e[j].erase(e[j].find(i));
    int k = getcenter(j);
    r[k] = r[i] + 1;
    if (!dfs(k)) {
      return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout << std::fixed << std::setprecision(20);
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    e[x].insert(y);
    e[y].insert(x);
  }
  for (int i = 1; i <= n; i++) {
    p[i] = e[i].size();
  }
  int k = getcenter(1);
  r[k] = 'A';
  if (!dfs(k)) {
    cout << "Impossible!\n";
  } else {
    for (int i = 1; i <= n; i++) {
      cout << r[i] << ' ';
    }
    cout << '\n';
  }
}
