#include <bits/stdc++.h>
using namespace std;
const int maxch = 30, maxx = 1e5 + 20;
vector<int> adj[maxx];
int n, ans[maxx], tmp[maxx][maxch], dp[maxx][maxch];
bool vis[maxx];
void dfs(int root) {
  vis[root] = true;
  for (int x : adj[root]) {
    if (!vis[x]) {
      dfs(x);
      for (int i = 0; i < 26; i++)
        if (tmp[x][i]) tmp[root][i] = 1;
      for (int i = 0; i < 26; i++) dp[root][i] += dp[x][i];
    }
  }
  int p = 0;
  while (p < 26 && dp[root][p] < 2) p++;
  for (int i = p - 1; i >= 0; i--) {
    if (!tmp[root][i]) {
      ans[root] = i;
      for (int j = i; j < maxch; j++) tmp[root][j] = 0;
      dp[root][i]++;
      tmp[root][i] = 1;
      break;
    }
  }
  for (int i = 0; i < maxch; i++) dp[root][i] = min(dp[root][i], 1);
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(0);
  for (int i = 0; i < n; i++) cout << (char)('A' + ans[i]) << " ";
  return 0;
}
