#include using namespace std; using P = pair; int n; vector> g; vector

bs; vector used, val; int dfs(int v, int p) { int res = 0, cnt = 0; used[v] = 1; // searching for(int w : g[v]) { if(w == v) { // self-loop edge continue; } if(w == p) { if(cnt > 0) { // (p, v): multiple edges res += 1; val[w] += 1; } ++cnt; continue; } if(!used[w]) { res += dfs(w, v); } else if(used[w] == 1) { res += 1; val[w] += 1; } } used[v] = 2; // searched res -= val[v]; if(p != -1 && res == 0) { bs.push_back(p < v ? P(p, v) : P(v, p)); } return res; } int bridge() { bs.clear(); used = vector(n, 0); val = vector(n, 0); int cc = 0; for (int i = 0; i < n; ++i) { if (!used[i]) { ++cc; dfs(i, -1); } } return cc; } int main() { cin >> n; g = vector>(n); for (int i = 0; i < n - 1; ++i) { int u, v; cin >> u >> v; g[u].push_back(v); g[v].push_back(u); } int cc = bridge(); if (cc >= 3 || cc == 2 && bs.size()) { cout << "Alice\n"; } else { cout << "Bob\n"; } return 0; }