#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
vector<int> G[MAX_N + 10];
pair<int, int> MD[MAX_N + 10];
int MP[MAX_N + 10][3] = {{0}};
int Par[MAX_N + 10] = {0};
int D[MAX_N + 10] = {0};
int Path[MAX_N + 10] = {0};
int ans[MAX_N + 10] = {0};
int Mark[MAX_N + 10] = {0};
int cheack[MAX_N + 10] = {0};
int t = 0;
int r = 0;
int m = 0;
void DFS(int u) {
  Mark[u] = 1;
  MP[u][0] = 0;
  MP[u][1] = 0;
  MP[u][2] = 0;
  MD[u].first = 0;
  MD[u].second = 0;
  for (int i = 0; i < (int)G[u].size(); i++)
    if ((Par[u] != G[u][i]) && (u != G[u][i])) {
      Par[G[u][i]] = u;
      D[G[u][i]] = D[u] + 1;
      DFS(G[u][i]);
    }
  int C = 0;
  for (int i = 0; i < (int)G[u].size(); i++) {
    if ((Par[u] != G[u][i]) && ((u != G[u][i]))) {
      C++;
    }
  }
  if (C == 0) {
    MP[u][0] = 1;
    MP[u][1] = u;
    MP[u][2] = u;
    MD[u].first = 1;
    MD[u].second = u;
  } else {
    pair<int, int> x, y;
    x.first = 0;
    y.first = 0;
    for (int i = 0; i < (int)G[u].size(); i++)
      if ((G[u][i] != Par[u]) && (G[u][i] != u)) {
        if (MD[u].first < ((D[MD[G[u][i]].second] - D[u]) + 1)) {
          MD[u].first = max(MD[u].first, (D[MD[G[u][i]].second] - D[u]) + 1);
          MD[u].second = MD[G[u][i]].second;
        }
        if (MD[G[u][i]].first + 1 > x.first) {
          y.first = x.first;
          y.second = x.second;
          x.first = MD[G[u][i]].first;
          x.second = MD[G[u][i]].second;
        } else {
          if (MD[G[u][i]].first + 1 > y.first) {
            y.first = MD[G[u][i]].first;
            y.second = MD[G[u][i]].second;
          }
        }
        if (MP[u][0] < MP[G[u][i]][0]) {
          MP[u][0] = max(MP[u][0], MP[G[u][i]][0]);
          MP[u][1] = MP[G[u][i]][1];
          MP[u][2] = MP[G[u][i]][2];
        }
      }
    if (MP[u][0] < x.first + y.first) {
      MP[u][0] = x.first + y.first;
      MP[u][1] = x.second;
      MP[u][2] = y.second;
    }
    if (MP[u][0] < MD[u].first) {
      MP[u][0] = MD[u].first;
      MP[u][1] = u;
      MP[u][2] = MD[u].second;
    }
  }
}
int fff = 0;
void dfs(int u, int v) {
  t++;
  Path[t] = u;
  if (u == v) {
    ans[Path[(t + 1) / 2]] = r;
    m -= 1;
    int x;
    x = Path[(t + 1) / 2];
    for (int i = 0; i < (int)G[x].size(); i++) {
      int y = G[x][i];
      for (int j = 0; j < (int)G[y].size(); j++)
        if (y != x) {
          if (G[y][j] == x) {
            swap(G[y][j], G[y][((int)G[y].size()) - 1]);
            G[y].pop_back();
          }
        }
    }
    G[x].clear();
    fff = 1;
    return;
  } else {
    for (int i = 0; i < (int)G[u].size(); i++)
      if ((G[u][i] != Par[u]) && (G[u][i] != u)) {
        Par[G[u][i]] = u;
        dfs(G[u][i], v);
        if (fff == 1) return;
      }
    t--;
  }
}
int main() {
  int n;
  cin >> n;
  m = n;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    G[x].push_back(y);
    G[y].push_back(x);
    if (cheack[x] == 0) {
      cheack[x] = 1;
      G[x].push_back(x);
    }
    if (cheack[y] == 0) {
      cheack[y] = 1;
      G[y].push_back(y);
    }
  }
  for (int i = 1; m > 0; i++) {
    for (int j = 1; j <= n; j++)
      if (Mark[j] == 0) {
        if (G[j].size() != 0) {
          Par[j] = j;
          D[j] = 0;
          DFS(j);
          Par[MP[j][1]] = MP[j][1];
          t = 0;
          fff = 0;
          dfs(MP[j][1], MP[j][2]);
        }
      }
    r++;
    memset(Mark, 0, sizeof Mark);
  }
  for (int i = 1; i <= n; i++) {
    cout << (char)(((int)'A') + (ans[i])) << " ";
  }
  cout << endl;
}
