#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const long long MAX = 5100000; const long long INF = 1LL << 60; const long long mod = 1000000007LL; //const long long mod = 998244353LL; using namespace std; typedef unsigned long long ull; typedef long long ll; class UnionFind { public: vector Parent; UnionFind(ll N) { Parent = vector(N, -1); } ll root(ll A) { if (Parent[A] < 0) { return A; } return Parent[A] = root(Parent[A]); } ll size(ll A) { return -Parent[root(A)]; } bool connect(ll A, ll B) { A = root(A); B = root(B); if (A == B) { return false; } if (size(A) < size(B)) { swap(A, B); } Parent[A] += Parent[B]; Parent[B] = A; return true; } }; int main() { /* cin.tie(nullptr); ios::sync_with_stdio(false); */ ll N; scanf("%lld", &N); UnionFind uni(N); vector deg(N); vector v; for (ll i = 0; i < N - 1; i++) { ll u, v; scanf("%lld %lld", &u, &v); uni.connect(u, v); deg[u]++; deg[v]++; } for (ll i = 0; i < N; i++) v.push_back(uni.root(i)); sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); if (uni.size(0) == N) { puts("Bob"); } else if (v.size() == 2) { bool flag = true; for (ll i = 0; i < N; i++) if (deg[i] == 1) flag = false; if (!flag) puts("Alice"); else puts("Bob"); } else { puts("Alice"); } return 0; }