#include <bits/stdc++.h>
using namespace std;
void print(long long int a[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
long long int m(long long int x) { return x % 1000000007; }
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int p(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int t = p(a, b / 2);
  if (b % 2 == 0)
    return t * t;
  else
    return a * t * t;
}
long long int n;
vector<long long int> a[200009];
long long int vis[200009] = {0};
long long int dp[200009] = {0};
long long int coun = 0;
long long int par[200009] = {0};
void predfs(long long int s, long long int p) {
  coun++;
  long long int ans = 1;
  for (long long int i = 0; i < a[s].size(); i++) {
    if (a[s][i] != p && vis[a[s][i]] != 1) {
      predfs(a[s][i], s);
    }
  }
  for (long long int i = 0; i < a[s].size(); i++) {
    if (a[s][i] != p && vis[a[s][i]] != 1) {
      ans += dp[a[s][i]];
    }
  }
  dp[s] = ans;
}
long long int centroid(long long int s, long long int p) {
  for (long long int i = 0; i < a[s].size(); i++) {
    if (a[s][i] != p && dp[a[s][i]] > coun / 2 && vis[a[s][i]] != 1) {
      return centroid(a[s][i], s);
    }
  }
  return s;
}
void decompose(long long int s, long long int p) {
  coun = 0;
  predfs(s, s);
  long long int c = centroid(s, s);
  vis[c] = 1;
  par[c] = p;
  for (long long int i = 0; i < a[c].size(); i++) {
    if (vis[a[c][i]] != 1) decompose(a[c][i], c);
  }
}
char ans[200009];
vector<long long int> b[200009];
void dfs(long long int s, long long int p, long long int t) {
  ans[s] = 'A' + t;
  for (long long int i = 0; i < b[s].size(); i++) {
    if (b[s][i] != p) {
      dfs(b[s][i], s, t + 1);
    }
  }
}
signed main() {
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n - 1; i++) {
    long long int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  decompose(1, -1);
  long long int root = -1;
  for (long long int i = 0; i < n + 1; i++) {
    if (i == 0) {
      continue;
    }
    if (par[i] == -1) {
      root = i;
      continue;
    }
    b[i].push_back(par[i]);
    b[par[i]].push_back(i);
  }
  for (long long int i = 0; i < 11; i++) {
  }
  dfs(root, root, 0);
  for (long long int i = 0; i < n + 1; i++) {
    if (i == 0) {
      continue;
    }
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
