	\begin{problem}{Reserve}{\textsl{standard input}}{\textsl{standard output}}{1 second}{512 mebibytes}{}

        Protoss prepare a new attack. They have a lot of battle units
        to attack, but it is necessary to leave some Zealots (it is one of the most
        useful Protoss battle unit) on the
        base (as a reserve) to be sure that the base is protected from
        any counterattack\ldots

        One Zealot requires $c_{ij}$ minerals to defend the base if employed from
        day $i$ to day $j$. Attack operation proceeds for $n$ days.
        Protoss commander Tryt o'Kill calculated that in day
        $k$ he needs at least $b_k$ Zealots on the base ($k=1,2,\ldots,n$).

        The general can keep exactly $b_k$ units on the base
        and pay them required number of minerals, but he wants
        to minimize the amount of minerals spent during all $n$ days.
        The general can also keep more than $b_k$ units on day k if this will result in smaller total amount of minerals.


        \InputFile

        First line of the input file contains number of days $n$, $1 \leq n \leq 50$.
        Next $n$ lines describe cost of keeping Zealots. So, $j$-th
        number in the $(i+1)$-th line of the input file is
        $c_{i,i+j-1}$. All costs are non-negative and don't exceed
        $10\,000$.
        The last line contains $b_k$ ($k=1,2,\ldots,n$). Consider $0 \leq b_k \leq
        2000$.

        All numbers in the input file are integral.

        \OutputFile

        In the first line write total amount of minerals General has
        to pay to Zealots to defend the base.
        Output a triangular table: $j$-th number of the
        $(i+1)$-th line should contain number of Zealots which have to
        defend the base from day $i$ to day $i+j-1$. This number shouldn't exceed $10^9$. Keep in mind that
        Protoss General wants to minimize amount of minerals paid to
        Zealots.

        It is guaranteed that the optimal amount of minerals
        doesn't exceed $10^9$.

	\Example

        \begin{example}
        \exmp{3     
        3 2 3       
        3 2         
        3           
        2 3 2}{7
	0 1 1
	0 1
	0}%
        \end{example}

    \end{problem}
