bobo has a tree with $n$ vertices. bobo would like to assign an $m$-dimension vector $\mathbf{p}(v)$ to vertex $v$, such that for all $a, b$, $\mathrm{dist}(a, b) = \langle \mathbf{p}(a), \mathbf{p}(b) \rangle$.
Note that $\mathrm{dist}(a, b)$ is the length of the shortest path between vertices $a$ and $b$. For two vectors $\mathbf{u} = (u_1, u_2, \dots, u_m)$ and $\mathbf{v} = (v_1, v_2, \dots, v_m)$, $\langle \mathbf{u}, \mathbf{v} \rangle = \max\{|u_1 - v_1|, |u_2 - v_2|, \dots, |u_m - v_m|\}$.
The first line contains an integer $n$ ($2 \leq n \leq 1000$).
Vertices are numbered by $1, 2, \dots, n$ for convenience.
Each of the following $(n - 1)$ lines contains $3$ integers $a_i, b_i, c_i$, which denotes an edge between vertices $a_i$ and $b_i$ with length $c_i$ ($1 \leq a_i, b_i \leq n, 1 \leq c_i \leq 100000$).
The first line contains an integer $m$, which denotes the dimension of vectors ($1 \leq m \leq 16$).
Each of the following $n$ lines contains $m$ integers which denotes the vector $\mathbf{p}(i)$. The coordinates should be in $[-10^9, 10^9]$.
Any appropriate solution will get accepted.