#include using namespace std; #define int long long #define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)x.size()) template bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } /* */ using vi = vector; using vvi = vector; using P = pair; class UnionFind { public: int n; vector par, rnk; UnionFind(int n_) { n = n_; par.resize(n); rnk.resize(n); for (int i = 0; i < n; i++) { par[i] = i; rnk[i] = 0; } } int find(int x) { if (par[x] == x) return x; return par[x] = find(par[x]); } void unite(int x, int y) { x = find(x); y = find(y); if (x == y) return; if (rnk[x] < rnk[y]) { par[x] = y; } else { par[y] = x; if (rnk[x] == rnk[y]) rnk[x]++; } } bool same(int x, int y) { return find(x) == find(y); } }; signed main() { int n; cin >> n; UnionFind uf(n); vi d(n); rep(i, 0, n - 1) { int u, v; cin >> u >> v; uf.unite(u, v); d[u]++; d[v]++; } int cnt = 0; bool d1 = false; rep(i, 0, n) { if(uf.find(i) == i) cnt++; if (d[i] == 1) d1 = true; } if (cnt > 2) cout << "Alice" << endl; else if (cnt == 2 and d1) cout << "Alice" << endl; else cout << "Bob" << endl; return 0; }