using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Numerics; class Node { private int Height { get; set; } private Node Parent { get; set; } private long size; public long Size { get { return Find().size; } set { size = value; } } public T Item { get; } public Node(T item) { Height = 0; Parent = this; Item = item; Size = 1; } public Node Find() { if (Parent == this) { return this; } var p = Parent.Find(); Parent = p; return p; } public static void Unite(Node a, Node b) { var p = a.Find(); var q = b.Find(); if (p.Height < q.Height) { p.Parent = q; q.Height = Math.Max(p.Height + 1, q.Height); q.Size += p.Size; p.Size = 0; } else { q.Parent = p; p.Height = Math.Max(q.Height + 1, p.Height); p.Size += q.Size; q.Size = 0; } } } class MyClass { public static void Solve() { var N = int.Parse(Console.ReadLine()); var adj = new HashSet[N]; var uf = new Node[N]; for (int i = 0; i < N; i++) { adj[i] = new HashSet(); uf[i] = new Node(i); } for (int i = 0; i < N-1; i++) { var input = Console.ReadLine().Split().Select(int.Parse).ToArray(); var u = input[0]; var v = input[1]; adj[u].Add(v); adj[v].Add(u); Node.Unite(uf[u], uf[v]); } var set = new HashSet(); for (int i = 0; i < N; i++) { set.Add(uf[i].Find().Item); } var comp = set.Count; var sol = 0; var deg1 = 0; for (int i = 0; i < N; i++) { if (adj[i].Count == 0) { sol++; } else if (adj[i].Count == 1) { deg1++; } } if (sol >= 2 || comp >= 3) { Console.WriteLine("Alice"); } else if (comp == 1) { Console.WriteLine("Bob"); } else { } } public static void Main() { var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Console.Out.Flush(); } }