from collections import deque class UnionFind: def __init__(self, n): self.par = [i for i in range(n+1)] self.rank = [0] * (n+1) self.size = [1 for _ in range(n+1)] # 検索 def find(self, x): if self.par[x] == x: return x else: self.par[x] = self.find(self.par[x]) return self.par[x] # 併合 def union(self, x, y): x = self.find(x) y = self.find(y) if self.rank[x] < self.rank[y]: self.par[x] = y self.size[y] += self.size[x] else: self.par[y] = x self.size[x] += self.size[y] if self.rank[x] == self.rank[y]: self.rank[x] += 1 # 同じ集合に属するか判定 def same_check(self, x, y): return self.find(x) == self.find(y) n = int(input()) uv = [[] for i in range(n)] ki = UnionFind(n+1) for i in range(n-1): u,v = map(int,input().split()) uv[u].append(v) uv[v].append(u) f,s = u,v if not ki.same_check(u,v): ki.union(u,v) f = True idx = ki.find(0) for i in range(n): if ki.find(i) != idx: f = False if f == True: print("Bob") exit() d = deque() d.append(u) li = [0]*n li[f] = 1 li[u] = 1 while len(d) > 0: tmp = d.popleft() for i in range(len(uv[tmp])): if li[uv[tmp][i]] == 1: lst = uv[tmp][i] continue else: d.append(uv[tmp][i]) li[uv[tmp][i]] = 1 if lst != f: print("Alice") else: print("Bob")