Alice and Bob are playing a fun game of tree tag.

The game is played on a tree of $n$ vertices numbered from $1$ to $n$. Recall that a tree on $n$ vertices is an undirected, connected graph with $n-1$ edges.

Initially, Alice is located at vertex $a$, and Bob at vertex $b$. They take turns alternately, and Alice makes the first move. In a move, Alice can jump to a vertex with distance at most $da$ from the current vertex. And in a move, Bob can jump to a vertex with distance at most $db$ from the current vertex. The distance between two vertices is defined as the number of edges on the unique simple path between them. In particular, either player is allowed to stay at the same vertex in a move. Note that when performing a move, a player only occupies the starting and ending vertices of their move, not the vertices between them.

If after at most $10^{100}$ moves, Alice and Bob occupy the same vertex, then Alice is declared the winner. Otherwise, Bob wins.

Determine the winner if both players play optimally.


-----Input-----

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). Description of the test cases follows.

The first line of each test case contains five integers $n,a,b,da,db$ ($2\le n\le 10^5$, $1\le a,b\le n$, $a\ne b$, $1\le da,db\le n-1$)  — the number of vertices, Alice's vertex, Bob's vertex, Alice's maximum jumping distance, and Bob's maximum jumping distance, respectively.

The following $n-1$ lines describe the edges of the tree. The $i$-th of these lines contains two integers $u$, $v$ ($1\le u, v\le n, u\ne v$), denoting an edge between vertices $u$ and $v$. It is guaranteed that these edges form a tree structure.

It is guaranteed that the sum of $n$ across all test cases does not exceed $10^5$.


-----Output-----

For each test case, output a single line containing the winner of the game: "Alice" or "Bob".


-----Example-----
Input
4
4 3 2 1 2
1 2
1 3
1 4
6 6 1 2 5
1 2
6 5
2 3
3 4
4 5
9 3 9 2 5
1 2
1 6
1 9
1 3
9 5
7 9
4 8
4 3
11 8 11 3 3
1 2
11 9
4 9
6 5
2 10
3 2
5 9
8 3
7 4
7 10

Output
Alice
Bob
Alice
Alice



-----Note-----

In the first test case, Alice can win by moving to vertex $1$. Then wherever Bob moves next, Alice will be able to move to the same vertex on the next move.

 [Image] 

In the second test case, Bob has the following strategy to win. Wherever Alice moves, Bob will always move to whichever of the two vertices $1$ or $6$ is farthest from Alice.

 [Image]

Difficulty: competition

Starter code:

Solutions:
from sys import stdin
from collections import deque
def NC_Dij(lis,start):

    ret = [float("inf")] * len(lis)
    ret[start] = 0
    
    q = deque([start])
    plis = [i for i in range(len(lis))]

    while len(q) > 0:
        now = q.popleft()

        for nex in lis[now]:

            if ret[nex] > ret[now] + 1:
                ret[nex] = ret[now] + 1
                plis[nex] = now
                q.append(nex)

    return ret,plis

tt = int(stdin.readline())

for loop in range(tt):

    n,a,b,da,db = list(map(int,stdin.readline().split()))
    N = n
    a -= 1
    b -= 1
    lis = [ [] for i in range(n)]

    for i in range(n-1):
        u,v = list(map(int,stdin.readline().split()))
        u -= 1
        v -= 1
        lis[u].append(v)
        lis[v].append(u)

    if 2*da >= db:
        print ("Alice")
        continue

    fa,tmp = NC_Dij(lis,a)
    if fa[b] <= da:
        print ("Alice")
        continue

    mv = 0
    for i in range(N):
        if fa[i] > fa[mv]:
            mv = i

    fv,tmp = NC_Dij(lis,mv)
    if max(fv) <= 2*da:
        print ("Alice")
    else:
        print ("Bob")
    


from sys import stdin
input = stdin.readline
q = int(input())
for _ in range(q):
    n,sa,sb,a,b = map(int,input().split())
    sa -=1
    sb -=1
    nbr = [[] for i in range(n)]
    for i in range(n-1):
        x, y = map(int,input().split())
        x -= 1
        y-= 1
        nbr[x].append(y)
        nbr[y].append(x)
    if 2 * a >= b:
        print("Alice")
    else:
        #jak najwieksza odleglosc > 2*a to bob, inaczej alice
        q = [sa]
        ind = 0
        dist = [-1] * n
        dist[sa] = 0
        while q:
            if ind >= len(q):
                break
            v = q[ind]
            ind += 1
            for w in nbr[v]:
                if dist[w] == -1:
                    q.append(w)
                    dist[w] = dist[v] + 1
        if dist[sb] <= a:
            print("Alice")
        else:
            q = [0]
            ind = 0
            dist = [-1] * n
            dist[0] = 0
            while q:
                if ind >= len(q):
                    break
                v = q[ind]
                ind += 1
                for w in nbr[v]:
                    if dist[w] == -1:
                        q.append(w)
                        dist[w] = dist[v] + 1
            maksik = 0
            best = 0
            for i in range(n):
                if dist[i] > maksik:
                    best = i
                    maksik = dist[i]
            q = [best]
            ind = 0
            dist = [-1] * n
            dist[best] = 0
            while q:
                if ind >= len(q):
                    break
                v = q[ind]
                ind += 1
                for w in nbr[v]:
                    if dist[w] == -1:
                        q.append(w)
                        dist[w] = dist[v] + 1
            if max(dist) > 2*a:
                print("Bob")
            else:
                print("Alice")

import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

# available on Google, not available on Codeforces
# import numpy as np
# import scipy


def solve(grid, n, a, b, x, y):  # fix inputs here
    grid = [(u-1, v-1) for u,v in grid]
    a, b = a-1, b-1
    console("----- solving ------")

    # you cannot escape in a tree
    if 2*x >= y:
        console("cannot escape evenutally")
        return "Alice"

    # need to check if alice can get bob first

    # check if longest path is more than 2*x + 1    
    # traverse twice

    d = defaultdict(list)

    for u,v in grid:
        d[u].append(v)
        d[v].append(u)

    visited = [-1 for _ in range(n)]
    visited[a] = 0
    stack = [(a,0)]

    while stack:
        cur, dist = stack.pop()
        for nex in d[cur]:
            if visited[nex] != -1:
                continue
            visited[nex] = dist+1
            stack.append((nex, dist+1))
    
    console(visited)
    if visited[b] <= x:
        console("catch at first step")
        return "Alice"
    
    end = visited.index(max(visited))

    visited = [-1 for _ in range(n)]
    visited[end] = 0
    stack = [(end,0)]

    while stack:
        cur, dist = stack.pop()
        for nex in d[cur]:
            if visited[nex] != -1:
                continue
            visited[nex] = dist+1
            stack.append((nex, dist+1))

    console(visited)
    if max(visited) > 2*x:
        console("big enough")
        return "Bob"
    
    console("not big enough")
    return "Alice"



def console(*args):  # the judge will not read these print statement
    # print('\033[36m', *args, '\033[0m', file=sys.stderr)
    return

# fast read all
inp = sys.stdin.readlines()
currow = 0
for case_num in range(int(inp[currow])):
    # read line as a string
    # strr = input()

    # read line as an integer
    # k = int(input())
    
    # read one line and parse each word as a string
    # lst = input().split()

    # read one line and parse each word as an integer
    currow = currow + 1
    nrows, a, b, x, y = list(map(int,inp[currow].split()))

    # read matrix and parse as integers (after reading read nrows)
    # lst = list(map(int,input().split()))
    # nrows = lst[0]  # index containing information, please change
    grid = []
    for _ in range(nrows-1):
        currow = currow + 1
        grid.append(list(map(int,inp[currow].split())))

    res = solve(grid, nrows, a, b, x, y)  # please change
    
    # Google - case number required
    # print("Case #{}: {}".format(case_num+1, res))

    # Codeforces - no case number required
    print(res)


import sys
input = lambda: sys.stdin.readline().rstrip()

from collections import deque
T = int(input())
for _ in range(T):
    N, a, b, da, db = list(map(int, input().split()))
    a, b = a-1, b-1
    X = [[] for _ in range(N)]
    Y = [[] for _ in range(N)]
    for _ in range(N-1):
        u, v = list(map(int, input().split()))
        X[u-1].append(v-1)
        X[v-1].append(u-1)
        Y[u-1].append(v-1)
        Y[v-1].append(u-1)
    if 2 * da >= db:
        print("Alice")
        continue
    P = [-1] * N
    Q = deque([a])
    R = []
    D = [0] * N
    while Q:
        i = deque.popleft(Q)
        R.append(i)
        for j in X[i]:
            if j != P[i]:
                P[j] = i
                D[j] = D[i] + 1
                X[j].remove(i)
                deque.append(Q, j)
    if D[b] <= da:
        print("Alice")
        continue
    
    ma = max(D)
    for i in range(N):
        if D[i] == ma:
            break
    
    X = Y
    P = [-1] * N
    Q = deque([i])
    R = []
    D = [0] * N
    while Q:
        i = deque.popleft(Q)
        R.append(i)
        for j in X[i]:
            if j != P[i]:
                P[j] = i
                D[j] = D[i] + 1
                X[j].remove(i)
                deque.append(Q, j)
    
    print("Bob" if max(D) > 2 * da else "Alice")
    
    
    



import sys
readline = sys.stdin.readline

def parorder(Edge, p):
    N = len(Edge)
    par = [0]*N
    par[p] = -1
    stack = [p]
    order = []
    visited = set([p])
    ast = stack.append
    apo = order.append
    while stack:
        vn = stack.pop()
        apo(vn)
        for vf in Edge[vn]:
            if vf in visited:
                continue
            visited.add(vf)
            par[vf] = vn
            ast(vf)
    return par, order
 
def getcld(p):
    res = [[] for _ in range(len(p))]
    for i, v in enumerate(p[1:], 1):
        res[v].append(i)
    return res
 
 


T = int(readline())
Ans = ['Bob']*T
for qu in range(T):
    N, fa, fb, da, db = map(int, readline().split())
    fa -= 1
    fb -= 1
    Edge = [[] for _ in range(N)]
    for _ in range(N-1):
        a, b = map(int, readline().split())
        a -= 1
        b -= 1
        Edge[a].append(b)
        Edge[b].append(a)
    
    if 2*da >= db:
        Ans[qu] = 'Alice'
        continue
    
    stack = [fa]
    dist = [0]*N
    used = set([fa])
    while stack:
        vn = stack.pop()
        for vf in Edge[vn]:
            if vf not in used:
                used.add(vf)
                dist[vf] = dist[vn] + 1
                stack.append(vf)
    if dist[fb] <= da:
        Ans[qu] = 'Alice'
        continue
    
    left = dist.index(max(dist))
    stack = [left]
    dist = [0]*N
    used = set([left])
    while stack:
        vn = stack.pop()
        for vf in Edge[vn]:
            if vf not in used:
                used.add(vf)
                dist[vf] = dist[vn] + 1
                stack.append(vf)
    
    D = max(dist)
    if 2*da >= D:
        Ans[qu] = 'Alice'




print('\n'.join(Ans))

from collections import deque
import sys
input = sys.stdin.readline


def get_diameter(tree):
    u, _, _ = _dfs(0, tree)
    v, diam, dist = _dfs(u, tree)

    path = [v]
    while v != u:
        for nxt_v in tree[v]:
            if 1 + dist[nxt_v] == dist[v]:
                path.append(nxt_v)
                v = nxt_v
                break
    return diam, path


def _dfs(start, tree):
    n = len(tree)
    dist = [-1] * n
    dist[start] = 0
    stack = [start]
    while stack:
        v = stack.pop()
        for nxt_v in tree[v]:
            if dist[nxt_v] != -1:
                continue
            dist[nxt_v] = dist[v] + 1
            stack.append(nxt_v)
    max_d = max(dist)
    return dist.index(max_d), max_d, dist


def ab(a, b):
    INF = 10 ** 6
    visited = [INF] * n
    visited[a] = 0
    q = deque([a])
    while q:
        v = q.popleft()
        for nxt_v in tree[v]:
            if visited[v] + 1 < visited[nxt_v]:
                visited[nxt_v] =  visited[v] + 1
                q.append(nxt_v)
    return visited[b]


t = int(input())
for _ in range(t):
    n, a, b, da, db = map(int, input().split())
    edges = [list(map(int, input().split())) for i in range(n - 1)]
    
    a -= 1
    b -= 1
    if da * 2 >= db:
        print("Alice")
        continue
        
    tree = [[] for i in range(n)]
    for u, v in edges:
        u -= 1
        v -= 1
        tree[u].append(v)
        tree[v].append(u)
    
    distance = ab(a, b)
    if distance <= da:
        print("Alice")
        continue

    d, _ = get_diameter(tree)
    d += 1
    db = da * 2 + 2

    if d >= db:
        print("Bob")
    else:
        print("Alice")

import sys
input = sys.stdin.readline

t=int(input())
for tests in range(t):
    n,a,b,da,db=list(map(int,input().split()))
    EDGE=[[] for i in range(n+1)]

    for i in range(n-1):
        x,y=list(map(int,input().split()))
        EDGE[x].append(y)
        EDGE[y].append(x)

    if db<=da*2:
        print("Alice")
        continue

    Q=[a]
    USE=[-1]*(n+1)
    USE[a]=0
    
    while Q:
        x=Q.pop()
        for to in EDGE[x]:
            if USE[to]==-1:
                USE[to]=USE[x]+1
                Q.append(to)

    #print(USE)

    if USE[b]<=da:
        print("Alice")
        continue

    MAX=-1
    MAXIND=-1
    for i in range(1,n+1):
        if USE[i]>MAX:
            MAX=USE[i]
            MAXIND=i

    Q=[MAXIND]
    USE2=[-1]*(n+1)
    USE2[MAXIND]=0
    
    while Q:

        x=Q.pop()
        for to in EDGE[x]:
            if USE2[to]==-1:

                USE2[to]=USE2[x]+1
                Q.append(to)

    DIA=max(USE2)
    #print(MAXIND,USE2,DIA)

    if DIA<=da*2:
        print("Alice")
        continue

    else:
        print("Bob")