#include "bits/stdc++.h" using namespace std; #define int long long #define REP(i,n) for(int i = 0;i < (int)(n);i++) #define RREP(i,n) for(int i = (int)n-1;i >= 0;i--) #define FOR(i,s,n) for(int i = s;i < (int)n;i++) #define RFOR(i,s,n) for(int i = (int)n-1;i >= s;i--) #define ALL(a) a.begin(),a.end() #define IN(a, x, b) (a<=x && xinline bool CHMAX(T&a,T b){if(ainline bool CHMIN(T&a,T b){if(a>b){a = b;return true;}return false;} constexpr long long INF = 1e9; signed main(){ int N; cin >> N; vector>g(N); vectorcnt(N); REP(i,N-1){ int a,b; cin >> a >> b; g[a].emplace_back(b); g[b].emplace_back(a); cnt[a]++; cnt[b]++; } int zero = 0; int zeroid = -1; REP(i,N){ if(cnt[i] == 0){ zero++; zeroid = i; } } if(zero == 0){ cout << "Bob" << endl; return 0; } if(zero >= 2){ cout << "Alice" << endl; return 0; } int flg = 1; REP(i,N){ if(i != zeroid && cnt[i] != 2){ cout << "Alice" << endl; return 0; } } vectorvisit(N,0); auto dfs = [&](auto&&f,int now,int par)->int{ visit[now] = true; int ret = 1; for(auto e:g[now]){ if(e == par || visit[e])continue; ret += f(f,e,now); } return ret; }; int sum; if(zeroid == 0)sum = dfs(dfs,1,-1); else sum = dfs(dfs,0,-1); if(sum == N - 1){ cout << "Bob" << endl; }else{ cout << "Alice" << endl; } }