#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; const ll MOD = 1000000007; const ll INF = 2147483647; const ll LINF = 9223372036854775807; #define REP(i, n) for(int i = 0; i < n; i++) #define ALL(v) v.begin(), v.end() VVI edge(100001, VI(0)); vector f(100001, 0); bool ff = 0; void dfs(int v) { f[v] = 1; if (edge[v].size() != 2) ff = 1; for (int i = 0; i < edge[v].size(); i++) { if (!f[edge[v][i]]) { dfs(edge[v][i]); } } } void dfs2(int v) { f[v] = 1; if (edge[v].size() != 2) ff = 1; for (int i = 0; i < edge[v].size(); i++) { if (!f[edge[v][i]]) { dfs(edge[v][i]); } } } int main() { int n; cin >> n; int a, b; REP(i, n - 1) { cin >> a >> b; edge[a].push_back(b); edge[b].push_back(a); } ff = 0; dfs(0); if (!ff) { int c = 0; REP(i, n) { if (!f[i]) { c++; } } if (c == 1) { cout << "Bob" << endl; } else { cout << "Alice" << endl; } return 0; } REP(i, n) f[i] = 0; ff = 0; dfs2(1); if (!ff) { cout << "Bob" << endl; } else { REP(i, n) { if (!f[i]) { cout << "Alice" << endl; return 0; } } cout << "Bob" << endl; } return 0; }