def find_min_travel_cost(n: int, x: int, y: int, roads: List[Tuple[int, int]]) -> int:
    """
    A group of n cities is connected by a network of roads. There is an undirected road between every pair of cities, so there are $\frac{n \cdot(n - 1)}{2}$ roads in total. It takes exactly y seconds to traverse any single road.
    
    A spanning tree is a set of roads containing exactly n - 1 roads such that it's possible to travel between any two cities using only these roads.
    
    Some spanning tree of the initial network was chosen. For every road in this tree the time one needs to traverse this road was changed from y to x seconds. Note that it's not guaranteed that x is smaller than y.
    
    You would like to travel through all the cities using the shortest path possible. Given n, x, y and a description of the spanning tree that was chosen, find the cost of the shortest path that starts in any city, ends in any city and visits all cities exactly once.
    
    
    -----Input-----
    
    The first line of the input contains three integers n, x and y (2 ≤ n ≤ 200 000, 1 ≤ x, y ≤ 10^9).
    
    Each of the next n - 1 lines contains a description of a road in the spanning tree. The i-th of these lines contains two integers u_{i} and v_{i} (1 ≤ u_{i}, v_{i} ≤ n) — indices of the cities connected by the i-th road. It is guaranteed that these roads form a spanning tree.
    
    
    -----Output-----
    
    Print a single integer — the minimum number of seconds one needs to spend in order to visit all the cities exactly once.
    
    
    -----Examples-----
    Input
    5 2 3
    1 2
    1 3
    3 4
    5 3
    
    Output
    9
    
    Input
    5 3 2
    1 2
    1 3
    3 4
    5 3
    
    Output
    8
    
    
    
    -----Note-----
    
    In the first sample, roads of the spanning tree have cost 2, while other roads have cost 3. One example of an optimal path is $5 \rightarrow 3 \rightarrow 4 \rightarrow 1 \rightarrow 2$.
    
    In the second sample, we have the same spanning tree, but roads in the spanning tree cost 3, while other roads cost 2. One example of an optimal path is $1 \rightarrow 4 \rightarrow 5 \rightarrow 2 \rightarrow 3$.
    """


# Tests

def check(find_min_travel_cost):
    assert find_min_travel_cost(5, 2, 3, [(1, 2), (1, 3), (3, 4), (5, 3)]) == 9
    assert find_min_travel_cost(5, 3, 2, [(1, 2), (1, 3), (3, 4), (5, 3)]) == 8
    assert find_min_travel_cost(50, 23129, 410924, [(18, 28), (17, 23), (21, 15), (18, 50), (50, 11), (32, 3), (44, 41), (50, 31), (50, 34), (5, 14), (36, 13), (22, 40), (20, 9), (9, 43), (19, 47), (48, 40), (20, 22), (33, 45), (35, 22), (33, 24), (9, 6), (13, 1), (13, 24), (49, 20), (1, 20), (29, 38), (10, 35), (25, 23), (49, 30), (42, 8), (20, 18), (32, 15), (32, 1), (27, 10), (20, 47), (41, 7), (20, 14), (18, 26), (4, 20), (20, 2), (46, 37), (41, 16), (46, 41), (12, 20), (8, 40), (18, 37), (29, 3), (32, 39), (23, 37)]) == 8113631
    assert find_min_travel_cost(2, 3, 4, [(1, 2)]) == 3
    assert find_min_travel_cost(50, 491238, 12059, [(42, 3), (5, 9), (11, 9), (41, 15), (42, 34), (11, 6), (40, 16), (23, 8), (41, 7), (22, 6), (24, 29), (7, 17), (31, 2), (17, 33), (39, 42), (42, 6), (41, 50), (21, 45), (19, 41), (1, 21), (42, 1), (2, 25), (17, 28), (49, 42), (30, 13), (4, 12), (10, 32), (48, 35), (21, 2), (14, 6), (49, 29), (18, 20), (38, 22), (19, 37), (20, 47), (3, 36), (1, 44), (20, 7), (4, 11), (39, 26), (30, 40), (6, 7), (25, 46), (2, 27), (30, 42), (10, 11), (8, 21), (42, 43), (35, 8)]) == 590891
    assert find_min_travel_cost(2, 4, 1, [(1, 2)]) == 4
    assert find_min_travel_cost(5, 2, 2, [(1, 2), (1, 3), (1, 4), (1, 5)]) == 8
    assert find_min_travel_cost(4, 100, 1, [(1, 2), (1, 3), (1, 4)]) == 102
    assert find_min_travel_cost(3, 2, 1, [(1, 2), (1, 3)]) == 3
    assert find_min_travel_cost(5, 6, 1, [(1, 2), (1, 3), (1, 4), (1, 5)]) == 9
    assert find_min_travel_cost(3, 100, 1, [(1, 2), (2, 3)]) == 101
    assert find_min_travel_cost(2, 2, 1, [(1, 2)]) == 2
    assert find_min_travel_cost(5, 3, 2, [(1, 2), (1, 3), (1, 4), (1, 5)]) == 9
    assert find_min_travel_cost(4, 1000, 1, [(1, 2), (1, 3), (1, 4)]) == 1002
    assert find_min_travel_cost(4, 100, 1, [(1, 2), (2, 3), (3, 4)]) == 3
    assert find_min_travel_cost(2, 3, 1, [(1, 2)]) == 3
    assert find_min_travel_cost(5, 4, 3, [(1, 2), (1, 3), (1, 4), (1, 5)]) == 13
check(find_min_travel_cost)