n = gets.chomp.to_i b = {} (n-1).times do u, v = gets.chomp.split.map(&:to_i) b[u] ||= [] b[u] << v b[v] ||= [] b[v] << u end mins = [0xffffffff] * n visited = [b.keys.first] q = [[b.keys.first, 0]] until q.empty? p, c = q.shift b[p].each do |bi| next if c + 1 >= mins[bi] mins[bi] = c + 1 visited << bi q.push([bi, c + 1]) end end puts visited.uniq.size == n ? 'Bob' : 'Alice'