#include <bits/stdc++.h>
using namespace std;
vector<char> str(33554432, '0');
vector<vector<int> > E;
vector<vector<bool> > T;
vector<int> V;
bool failed;
bool dfs(int u) {
  if (V[u] != 33554436) return false;
  V[u] = 33554436 + 1;
  int color = 26;
  for (int i = 0; i < E[u].size(); i++) {
    if (dfs(E[u][i])) {
      for (int j = 0; j < 26; j++) {
        if (T[u][j] && T[E[u][i]][j]) color = min(color, j);
        T[u][j] = T[u][j] | T[E[u][i]][j];
      }
    }
  }
  for (int i = color - 1; i >= 0; i--) {
    if (!T[u][i]) {
      color = i;
      break;
    }
  }
  V[u] = color;
  T[u][V[u]] = true;
  for (int i = V[u] + 1; i < 26; i++) T[u][i] = false;
  if (V[u] < 0) failed = true;
  return true;
}
int main() {
  int n, a, b;
  cin >> n;
  int cur = 0;
  E.resize(n + 1);
  T.resize(n + 1, vector<bool>(26, false));
  V.resize(n + 1, 33554436);
  for (size_t i = 0; i < n - 1; ++i) {
    cin >> a >> b;
    E[a].push_back(b);
    E[b].push_back(a);
  }
  dfs(1);
  if (failed)
    cout << "Impossible!" << endl;
  else {
    cout << char('A' + V[1]);
    for (int i = 2; i <= n; i++) {
      cout << ' ' << char('A' + V[i]);
    }
    cout << endl;
  }
  return 0;
}
