#include <bits/stdc++.h>
using namespace std;
int mas[21];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  mas[0] = 1;
  for (int i = 1; i <= 20; i++) {
    mas[i] = mas[i - 1] * 2;
  }
  int n;
  cin >> n;
  vector<vector<int> > graph(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    graph[a - 1].push_back(b - 1);
    graph[b - 1].push_back(a - 1);
  }
  vector<char> answer(n, 'x');
  queue<pair<int, int> > q;
  int letter = 0;
  q.push({0, 1});
  while (!q.empty()) {
    int v = q.front().first;
    int dist = q.front().second;
    q.pop();
    if ((v == 0 && graph[v].size() > 1) || graph[v].size() > 2) {
      if (letter == 26) {
        cout << "Impossible!";
        return 0;
      }
      answer[v] = 'A' + letter;
      letter++;
      for (auto& i : graph[v]) {
        if (answer[i] == 'x') {
          q.push({i, 1});
        }
      }
    } else {
      for (int i = 1; i <= 20; i++) {
        if (dist % mas[i] == mas[i] / 2) {
          answer[v] = 'Z' + 1 - i;
          break;
        }
      }
      for (auto& i : graph[v]) {
        if (answer[i] == 'x') {
          q.push({i, dist + 1});
        }
      }
    }
  }
  for (auto& i : answer) {
    cout << i << " ";
  }
  return 0;
}
