#define ll long long #define I inline #define N 100001
usingnamespacestd;
int n , m1 , m2 , deep[N]; int Alice[N] , Bob[N];
structEdge{ int from; int to; int last; }edge[N << 1];
int edge_num; int head[N << 1];
I voidadd_edge(int from , int to){ edge[++ edge_num] = (Edge){from , to , head[from]}; head[from] = edge_num; }
bool vis[N];
voidsearch(int root , int fa , int dep){ deep[root] = dep; for(int i = head[root]; i ; i = edge[i].last){ int to = edge[i].to; if(to == fa){ continue; } search(to , root , dep + 1); } }
namespace Solve{ //方便处理多组数据
voidmain(){ for(int i = 1; i <= n; i ++){ //多测不清空,爆零两行泪 Alice[i] = Bob[i] = 0; vis[i] = false; edge[i].to = edge[i].last = edge[i].from = 0; } memset(head , 0 , sizeof(head)); edge_num = 0; int u , v; cin >> n >> m1 >> m2; for(int i = 1; i <= n - 1; i ++){ cin >> u >> v; u ++ , v ++; //由于题目中将0作为根节点,因此读入时需要+1以方便处理 add_edge(u , v); add_edge(v , u); } search(1 , 0 , 0); //预处理各个点的深度 ll A = 0 , B = 0; for(int i = 1; i <= m1; i ++){ //计算两个人的权值 cin >> Alice[i]; Alice[i] += 1; A += deep[Alice[i]]; } for(int i = 1; i <= m2; i ++){ cin >> Bob[i]; Bob[i] += 1; B += deep[Bob[i]]; } if(A > B) puts("Alice"); //若先手的次数大于后手,则先手必胜 elseputs("Bob"); //否则,后手必胜。 } }