def act_diposits(Ln, Ld, Lc):
    tot = 0
    for nom, c in Lc:
        Ld[Ln.index(nom)] -= c
        tot += c
    Ld[-1] -= tot
