#include using namespace std; using lint = long long; const lint inf = 1LL << 60; const lint mod = 1000000007; struct UnionFind { vector rank, parent, size; // +1 for 1-indexed nodes UnionFind(int n) : rank(n + 1, 0), parent(n + 1), size(n + 1, 1) { iota(parent.begin(), parent.end(), 0); // parent is itself } int root(int x) { if (x != parent[x]) { parent[x] = root(parent[x]); } return parent[x]; } bool isSame(int x, int y) { return root(x) == root(y); } bool unite(int x, int y) { return link(root(x), root(y)); } bool link(int x, int y) { if (x == y) return false; if (rank[x] > rank[y]) { parent[y] = x; size[x] += size[y]; } else { parent[x] = y; size[y] += size[x]; if (rank[x] == rank[y]) { rank[y]++; } } return true; } int getSize(int x) { return size[root(x)]; } }; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); lint n; cin >> n; UnionFind uf(n); vector deg(n, 0); for (int i = 0; i < n - 1; ++i) { int u, v; cin >> u >> v; uf.unite(u, v); deg[u]++; deg[v]++; } if (uf.getSize(0) == n) { cout << "Bob" << "\n"; } else { bool ok = true; int idp = 0; int tot = 0; for (int i = 0; i < n; ++i) { if (deg[i] == 0) idp++; else if (deg[i] != 2) ok = false; else if (uf.getSize(i) != n - 1) { ok = false; } tot += deg[i]; } if (ok && idp == 1) { assert(tot == 2 * (n - 1)); cout << "Bob" << "\n"; } else { cout << "Alice" << "\n"; } } return 0; }