#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int sl[N], cent[N];
int n;
vector<int> a[N];
void dfs(int u, int par) {
  sl[u] = 1;
  for (int i = 0; i < a[u].size(); ++i) {
    if (a[u][i] == par || cent[a[u][i]]) continue;
    dfs(a[u][i], u);
    sl[u] += sl[a[u][i]];
  }
}
int get(int u, int par, int k) {
  for (int i = 0; i < a[u].size(); ++i) {
    if (cent[a[u][i]] || a[u][i] == par) continue;
    if (sl[a[u][i]] > k / 2) return get(a[u][i], u, k);
  }
  return u;
}
void centroid(int u, int h) {
  dfs(u, u);
  int par = get(u, u, sl[u]);
  cent[par] = h;
  for (int i = 0; i < a[par].size(); ++i) {
    if (cent[a[par][i]] == 0) centroid(a[par][i], h + 1);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  dfs(1, 1);
  centroid(1, 1);
  for (int i = 1; i <= n; ++i) cout << char('A' + cent[i] - 1) << " ";
  return 0;
}
