#include <bits/stdc++.h>
using namespace std;
__inline bool nextInt(int &val) {
  char ch;
  int sgn = 1;
  while ((ch = getchar()) != EOF) {
    if (ch == '-') sgn = -1;
    if (ch >= '0' && ch <= '9') break;
  }
  if (ch == EOF) return false;
  val = (int)(ch - '0');
  while (true) {
    ch = getchar();
    if (ch >= '0' && ch <= '9') {
      val = 10 * val + (int)(ch - '0');
    } else
      break;
  }
  val *= sgn;
  return true;
}
__inline bool nextString(string &s) {
  char ch;
  while ((ch = getchar()) != EOF) {
    if (ch >= 33 && ch <= 126) break;
  }
  if (ch == EOF) return false;
  s = string(1, ch);
  while (true) {
    ch = getchar();
    if (ch >= 33 && ch <= 126) {
      s = s + string(1, ch);
    } else
      break;
  }
  return true;
}
int n, curId, curCol, sub[111888], dpt[111888], d1[111888], d2[111888],
    col[111888], f[111888];
vector<int> e[111888];
char officer[111888];
bool solved;
void dfs(int u, int pu) {
  sub[u] = 1;
  dpt[u] = 1;
  for (int ie = 0; ie < (e[u].size()); ie++) {
    int v = e[u][ie];
    if (v != pu) {
      dfs(v, u);
      dpt[u] = ((dpt[u]) > (dpt[v] + 1) ? (dpt[u]) : (dpt[v] + 1));
      sub[u] += sub[v];
    }
  }
}
void calc_height(int u, int pu, int up) {
  int maxD1 = -1, maxD2 = -1;
  for (int ie = 0; ie < (e[u].size()); ie++) {
    int v = e[u][ie];
    if (v != pu) {
      if (dpt[v] + 1 > maxD1) {
        maxD2 = maxD1;
        maxD1 = dpt[v] + 1;
      } else if (dpt[v] + 1 > maxD2) {
        maxD2 = dpt[v] + 1;
      }
    }
  }
  d1[u] = d2[u] = -1;
  d1[u] = ((up) > (maxD1) ? (up) : (maxD1));
  if (up == d1[u])
    d2[u] = maxD1;
  else
    d2[u] = ((up) > (maxD2) ? (up) : (maxD2));
  for (int ie = 0; ie < (e[u].size()); ie++) {
    int v = e[u][ie];
    if (v != pu) {
      int nup = up + 1;
      if (dpt[v] + 1 == maxD1)
        nup = ((nup) > (maxD2) ? (nup) : (maxD2));
      else
        nup = ((nup) > (maxD1) ? (nup) : (maxD1));
      calc_height(v, u, nup);
    }
  }
}
void tree_color(int u, int pu, int color, vector<int> &t) {
  t.push_back(u);
  col[u] = color;
  for (int ie = 0; ie < (e[u].size()); ie++) {
    int v = e[u][ie];
    if (v != pu) {
      tree_color(v, u, color, t);
    }
  }
}
bool solve(vector<int> &nodes, char curOfficer) {
  curId++;
  if (nodes.size() <= 2) {
    for (int i = 0; i < (nodes.size()); i++) officer[nodes[i]] = curOfficer + i;
    return true;
  }
  dfs(nodes[0], -1);
  calc_height(nodes[0], -1, 0);
  for (int i = 0; i < (nodes.size()); i++) col[nodes[i]] = -1;
  int bn = 0, bu = nodes[0], bval = d1[nodes[0]];
  for (int i = (1); i < (nodes.size()); i++) {
    int u = nodes[i];
    if (d1[u] < bval) {
      bval = d1[u];
      bn = i;
      bu = u;
    }
  }
  int need = ((1) > (((d1[0]) > (0) ? (d1[0]) : (0)) +
                     ((d2[0]) > (0) ? (d2[0]) : (0)) - 1)
                  ? (1)
                  : (((d1[0]) > (0) ? (d1[0]) : (0)) +
                     ((d2[0]) > (0) ? (d2[0]) : (0)) - 1));
  officer[bu] = curOfficer;
  curOfficer++;
  vector<vector<int> > subs;
  for (int ie = 0; ie < (e[bu].size()); ie++) {
    int v = e[bu][ie];
    if (v == bu) continue;
    vector<int> tmp;
    tree_color(v, bu, curCol++, tmp);
    subs.push_back(tmp);
  }
  for (int i = 0; i < (nodes.size()); i++) {
    int u = nodes[i];
    vector<int> tmp;
    for (int ie = 0; ie < (e[u].size()); ie++) {
      int v = e[u][ie];
      if (col[v] == col[u]) tmp.push_back(v);
    }
    e[u] = tmp;
  }
  for (int is = 0; is < (subs.size()); is++) {
    solve(subs[is], curOfficer);
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  f[1] = 1;
  f[2] = 2;
  for (int i = (3); i < (111888); i++) {
    f[i] = f[i / 2] + 1;
  }
  scanf("%d", &n);
  for (int i = 0; i < (n - 1); i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--;
    v--;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  solved = true;
  vector<int> nodes;
  for (int i = 0; i < (n); i++) nodes.push_back(i);
  curId = 0;
  solved = solve(nodes, 'A');
  if (solved) {
    for (int i = 0; i < (n); i++) printf("%c ", officer[i]);
    printf("\n");
  } else {
    printf("Impossible!\n");
  }
  return 0;
}
