#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; struct UnionFind{ vector data; int __size; UnionFind(int sz) { data.assign(sz, -1); __size = sz; } bool unite(int x, int y) { x = find(x), y = find(y); if(x == y) return (false); if(data[x] > data[y]) swap(x, y);//親は負でサイズを保存 __size--; data[x] += data[y]; data[y] = x; return (true); } int find(int k) { if(data[k] < 0) return (k); return (data[k] = find(data[k])); } bool same(int x, int y){ return find(x) == find(y); } int size(int k) { return (-data[find(k)]); } int unum() { return (__size); } }; int main(){ int n; cin >> n; UnionFind uf(n); vector in(n,0); rep(i,n-1) { int u, v; cin >> u >> v; uf.unite(u, v); in[u]++; in[v]++; } if (uf.unum() == 1) cout << "Bob" << endl; else if (uf.unum() == 2) { bool ok = true; for (int i = 0; i < n; i++) if (in[i] == 1) ok = false; if (ok) cout << "Bob" << endl; else cout << "Alice" << endl; } else cout << "Alice" << endl; return 0; }