#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using i64 = int64_t; using i32 = int32_t; template T iabs(const T& x) { return max(x, -x); } struct UnionFind { vector p, s; UnionFind(size_t n) : p(n, -1), s(n, 1) {} int root(int u) { while (p[u] != -1) u = p[u]; return u; } bool same(int i, int j) { return root(i) == root(j); } void unite(int u, int v) { u = root(u); v = root(v); if (u != v) { if (s[u] < s[v]) swap(u, v); p[v] = u; s[u] += s[v]; } } int size(int i) { return s[root(i)]; } }; int n; int main() { cin >> n; vector deg(n); UnionFind uf(n); for (int i = 0; i < n - 1; ++i) { int u, v; cin >> u >> v; deg[u]++; deg[v]++; uf.unite(u, v); } if (uf.size(0) == n) { cout << "Bob\n"; return 0; } int cnt0 = 0, cnt2 = 0; for (int u = 0; u < n; ++u) { if (deg[u] == 0) { ++cnt0; } if (deg[u] == 2) { ++cnt2; } } if (cnt0 == 1 && cnt2 == n - 1) { cout << "Bob\n"; return 0; } cout << "Alice\n"; return 0; }