#include int ri() { int n; scanf("%d", &n); return n; } std::vector > hen; std::vector used; std::vector ord, low; int tour_cnt = 0; bool bridge = false; void dfs(int i, int prev) { ord[i] = tour_cnt++; low[i] = i; for (auto j : hen[i]) { if (j == prev) continue; if (used[j]) { low[i] = std::min(low[i], j); } else { used[j] = true; dfs(j, i); low[i] = std::min(low[i], low[j]); if (low[j] > ord[i]) bridge = true; } } } int main() { int n = ri(); hen.resize(n); for (int i = 0; i + 1 < n; i++) { int a = ri(); int b = ri(); hen[a].push_back(b); hen[b].push_back(a); } used.resize(n); ord.resize(n); low.resize(n); int cnt = 0; for (int i = 0; i < n; i++) { if (!used[i]) { used[i] = true; cnt++; dfs(i, -1); } } bool res = cnt > 2 || (cnt == 2 && bridge); puts(res ? "Alice" : "Bob"); return 0; }