#include #define EM 1000000 using namespace std; using LL = long long; using P = pair; LL LINF = 1e18; int INF = 1e9; LL mod = 1e9+7; using vint = vector; using vLL = vector; using vvint = vector>; using vvLL = vector>; 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; } vector> G(1e5); vector used(1e5), pre(1e5), low(1e5); int bledge = 0; pair dfs(int v, int vpre){ used[v] = 1; int cpre = vpre; pre[v] = low[v] = cpre; for(auto g : G[v]){ if(used[g]){ if(pre[g] != vpre-1) low[v] = min(low[v], low[g]); continue; } cpre++; pair m = dfs(g, cpre); low[v] = min(low[v], m.first); cpre = m.second; } if(low[v] >= pre[v] && pre[v] > 0) bledge++; return make_pair(low[v], cpre); } int main(){ int N; cin >> N; for(int i = 0;i < N-1;i++){ int ui, vi; cin >> ui >> vi; G[ui].push_back(vi); G[vi].push_back(ui); } int cnt = 0; for(int i = 0;i < N;i++){ if(used[i]) continue; cnt++; dfs(i, 0); } if(cnt >= 3) cout << "Alice" << endl; else if(cnt == 2){ if(bledge > 0) cout << "Alice" << endl; else cout << "Bob" << endl; }else cout << "Bob" << endl; }