#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MAXN = 1e6 + 5;
const long long INF = (1ll << 31) - 1;
const double PI = 3.14159265359;
int n, col[MAXN], t[MAXN], cn;
bool Del[MAXN];
vector<vector<int> > g(MAXN);
void subTree(int v, int p = -1) {
  t[v] = 1;
  for (auto to : g[v]) {
    if (to != p && !Del[to]) {
      subTree(to, v);
      t[v] += t[to];
    }
  }
}
int findCentroid(int v, int p = -1) {
  for (auto to : g[v]) {
    if (to != p && !Del[to]) {
      if (t[to] > cn / 2) return findCentroid(to, v);
    }
  }
  return v;
}
void solve(int v, int color = 'A') {
  if (color > 'Z') {
    cout << "Impossible";
    exit(0);
  }
  subTree(v);
  cn = t[v];
  int currCentroid = findCentroid(v);
  col[currCentroid] = color;
  Del[currCentroid] = true;
  for (auto to : g[currCentroid]) {
    if (!Del[to]) {
      solve(to, color + 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n - 1; ++i) {
    int x, y;
    col[i] = -1;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  solve(1);
  for (int i = 1; i <= n; ++i) cout << char(col[i]) << " ";
}
