#include using namespace std; void dfs(const vector> &to, vector &isvisited, int index) { isvisited.at(index) = true; for (int next : to.at(index)) { if (isvisited.at(next)) return; } } int main() { int n; cin >> n; vector> to(n); for (int i = 0; i < n - 1; i++) { int u, v; cin >> u >> v; to.at(u).push_back(v); to.at(v).push_back(u); } vector isvisited(n); int connected = 0; for (int i = 0; i < n; i++) { if (isvisited.at(i)) continue; connected++; dfs(to, isvisited, i); } if (connected == 1) { cout << "Bob" << endl; } else if (connected >= 3) { cout << "Alice" << endl; } else { for (int i = 0; i < n; i++) { if (to.at(i).size() == 1) { cout << "Alice" << endl; return 0; } } cout << "Bob" << endl; } }