class binary_trie: def __init__(self, MAX_LOG): self.ch = [-1] * 2 self.cnt = [0] self.id = 1 self.xor_all = 0 self.max_log = MAX_LOG def insert(self, val): val ^= self.xor_all node = 0 for b in range(self.max_log-1, -1, -1): f = val >> b & 1 self.cnt[node] += 1 if self.ch[(node<<1)|f] == -1: self.ch[(node<<1)|f] = self.id self.ch.append(-1) self.ch.append(-1) self.cnt.append(0) node = self.id self.id += 1 else: node = self.ch[(node<<1)|f] self.cnt[node] += 1 def size(self, node): if node == -1: return 0 return self.cnt[node] def count(self, val): val ^= self.xor_all node = 0 for b in range(self.max_log-1, -1, -1): if node == -1: break node = self.ch[(node<<1)|(val>>b&1)] return self.size(node) def xth(self, x): node = 0 ret = 0 for b in range(self.max_log-1, -1, -1): f = self.xor_all>>b&1 if self.size(self.ch[(node<<1)|f]) <= x: x -= self.size(self.ch[(node<<1)|f]) node = self.ch[(node<<1)|(f^1)] ret = (ret<<1)|(f^1) else: node = self.ch[(node<<1)|f] ret = (ret<<1)|f return ret ^ self.xor_all def mex(self): ub = self.cnt[0] lb = -1 while ub - lb > 1: t = (ub + lb) // 2 if self.xth(t) == t: lb = t else: ub = t return lb + 1 def xor_to_all(self, x): self.xor_all ^= x return n = int(input()) ikeru = [[] for i in range(n)] for i in range(n-1): u, v = map(int,input().split()) u -= 1 v -= 1 ikeru[u].append(v) ikeru[v].append(u) dp = [0] * n ep = [binary_trie(18) for i in range(n)] re = [i for i in range(n)] mada = [~0, 0] tansaku = [0] * n tansaku[0] = 1 while mada: i = mada.pop() if i >= 0: for j in ikeru[i]: if tansaku[j] == 1: continue tansaku[j] = 1 mada.append(~j) mada.append(j) else: i = ~i x = 0 mxval = 0 mxind = i for j in ikeru[i]: if tansaku[j] == 2: x ^= dp[j] if mxval < ep[re[j]].cnt[0]: mxval = ep[re[j]].cnt[0] mxind = j ep[re[mxind]].xor_to_all(dp[mxind]^x) for j in ikeru[i]: if tansaku[j] == 2: if j == mxind: continue mxz = ep[re[j]].cnt[0] for z in range(mxz): tar = ep[re[j]].xth(z) if ep[re[mxind]].count(tar^x^dp[j]) == 0: ep[re[mxind]].insert(tar^x^dp[j]) if ep[re[mxind]].count(x) == 0: ep[re[mxind]].insert(x) re[i] = re[mxind] dp[i] = ep[re[i]].mex() tansaku[i] = 2 ans = [] mada = [0] tansaku = [0] * n tansaku[0] = 1 gogo = [0] * n while mada: i = mada.pop() if i >= 0: x = gogo[i] for j in ikeru[i]: if tansaku[j] == 1: continue x ^= dp[j] if x == 0: ans.append(i) for j in ikeru[i]: if tansaku[j] == 1: continue tansaku[j] = 1 gogo[j] = x^dp[j] mada.append(j) if len(ans) == 0: print("Bob") else: print("Alice") print(len(ans)) ans.sort() print(*[x+1 for x in ans])