This problem only contains one test case.
The first line of the input contains three integers $n, m, q (2 \leq n \leq 500, 1 \leq m \leq 10^4, 1 \leq q \leq 10^6)$. The next line contains $n - 1$ integers $w_i (1 \leq w_i \leq 10^4)$. The probability of vertex $x$ as the starting vertex can be represented as follow:
\begin{equation}
P_x = \frac{w_x}{\sum_{i=1}^{n-1}w_i} \tag{1}
\end{equation}
The next $m$ lines contains four integers $x, y, a, b (1 \leq x, y \leq n, 1 \leq b \leq a \leq 100)$, representing an edge between $x$ and $y$ with $a$ coins initially and $b$ coins finally.
Then $q$ lines follow, each line has one of the following format:
- 1 x y a b $(1 \leq x, y \leq n, 1 \leq b \leq a \leq 100)$, representing changing the initial coins on $(x, y)$ to $a$ and final coins on $(x, y)$ to $b$. It is guaranteed that there is an edge between $x$ and $y$.
- 2 x c $(1 \leq x \leq n - 1, 1 \leq c \leq 10^4)$, representing changing $w_x$ to $c$. Note that after this change not only $P_x$ but all probabilities will change according to formula (1). It is guaranteed that the number of this change is no more than $n$.
Note that the changes are persistent and the $(i+1)$th change is based on the $i$th change.