#include using namespace std; using ll = long long; class UnionFind{ private: vector data; public: UnionFind(int n) : data(n,-1) {} int root(int i) { return data[i] < 0 ? i : data[i] = root(data[i]); } int size(int i) { return -data[root(i)]; } bool same(int x, int y) {return root(x) == root(y); } bool connected() {return size(0) == (int)data.size(); } bool unit(int i,int j){ i = root(i); j = root(j); if(i != j){ data[i] += data[j]; data[j] = i; } return i != j; } }; int main() { int n; cin >> n; UnionFind tree(n); int res = 0; vector num(n); for(int i = 0; i < n - 1; i++) { int u, v; cin >> u >> v; if(tree.same(u,v))res++; tree.unit(u,v); num[u]++; num[v]++; } setst; for(int i = 0; i < n; i++)st.insert(tree.root(i)); if(st.size() == 1) { cout << "Bob" << endl; } if(st.size() >= 3) { cout << "Alice" << endl; } if(st.size() == 2) { if(count(num.begin(), num.end(), 2) == n - 1) cout << "Bob" << endl; else cout << "Alice" << endl; } }