def expand(path:list, conc_var:list) -> list:
    """
    expand( path=[1, 2, 3], conc_var=[['a', 'c'], ['b', 'c']] ) 
                    ---> [[1, 'a', 2, 'c', 3], [1, 'b', 2, 'c', 3]]
    gives the detailed path!
    Parameters
    ----------
    path : list
        The ids of formulas that form a path.
    conc_var : list
        the conected variables between two formulas.

    Returns
    -------
    list
        The detailed path.

    """
    ft = []
    cv = [list(cc) for cc in list(conc_var)]
    for c in cv:
        w = []
        p = path.copy()
        while c:
            w.append(p.pop())
            w.append(c.pop())
        w.append(p.pop())
        ft.append(w[::-1])
    return ft