#include #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } struct UFT { vector parent; UFT(int n) { parent.resize(n); rep(i, n) parent[i] = i; } int root(int x) { if (x == parent[x]) return x; return parent[x] = root(parent[x]); } bool samegroup(int x, int y) { return root(x) == root(y); } void unite(int x, int y) { x = root(x); y = root(y); if (x == y) return; // TODO: no rank check parent[x] = y; } int groups() { int ans = 0; rep(i, parent.size()) { if (root(i) == i) { ans++; } } return ans; } void dump() { rep(i, parent.size()) { printf("%d\t%d\n", i, root(i)); } } }; int main(int argc, char** argv) { int n; cin >> n; int u, v; UFT t(n); rep(i, n - 1) { cin >> u >> v; t.unite(u, v); } // cout << t.groups() << endl; if (t.groups() >= 2) cout << "Alice" << endl; else cout << "Bob" << endl; return 0; };