// // Created by yamunaku on 2020/01/31. // #include using namespace std; #define rep(i, n) for(int i = 0; i < (n); i++) #define repl(i, l, r) for(int i = (l); i < (r); i++) #define per(i, n) for(int i = ((n)-1); i >= 0; i--) #define perl(i, l, r) for(int i = ((r)-1); i >= (l); i--) #define all(x) (x).begin(),(x).end() #define MOD9 998244353 #define MOD1 1000000007 #define IINF 1000000000 #define LINF 1000000000000000000 #define SP <<" "<< #define CYES cout<<"Yes"<; using mti = vector>; using vl = vector; using mtl = vector>; using pi = pair; using pl = pair; template using heap = priority_queue, function>; int main(){ // CFS; int n; cin >> n; mti e(n); rep(i, n - 1){ int u, v; cin >> u >> v; e[u].push_back(v); e[v].push_back(u); } vi f(n, false); vi c(n, 0), ec(n, 0); int count = 0; rep(i, n){ if(!f[i]){ count++; c[i] = 1, ec[i] = 0; f[i] = true; queue q; q.push(i); while(!q.empty()){ int x = q.front(); q.pop(); for(auto &nx:e[x]){ ec[i]++; if(f[nx]) continue; f[nx] = true; q.push(nx); c[i]++; } } } } if(count == 1){ cout << "Bob" << endl; return 0; } if(count > 2){ cout << "Alice" << endl; return 0; } rep(i, n){ if(c[i] > 0){ if(c[i] == ec[i] / 2 && c[i] == n - 1){ f = vi(n, false); queue q; f[i] = true; q.push(i); while(!q.empty()){ int x = q.front(); q.pop(); if(e[x].size()!=2){ cout << "Alice" << endl; return 0; } for(auto &nx:e[x]){ if(f[nx]) continue; f[nx] = true; q.push(nx); } } cout << "Bob" << endl; return 0; } } } cout << "Alice" << endl; return 0; }